Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

feat: Lint Dockerfiles #171

Merged
merged 1 commit into from
Jan 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .hadolint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
ignored:
- DL3008
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ repos:
language: system
stages: [commit-msg]

- id: hadolint
name: hadolint
language: docker_image
entry: hadolint/hadolint hadolint
files: Dockerfile

- id: isort
name: isort
entry: isort
Expand Down
4 changes: 3 additions & 1 deletion datalake/backend/processing/check_files_checksums/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt update && apt install -y python3 && rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-get install --assume-yes --no-install-recommends python3 \
&& rm -rf /var/lib/apt/lists/*
COPY datalake/backend/processing/check_files_checksums/task.py /opt/task.py
RUN chmod +x /opt/task.py
ENTRYPOINT ["/opt/task.py"]
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt update && apt install -y python3 && rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-get install --assume-yes --no-install-recommends python3 \
&& rm -rf /var/lib/apt/lists/*
COPY datalake/backend/processing/check_flat_directory_structure/task.py /opt/task.py
RUN chmod +x /opt/task.py
ENTRYPOINT ["/opt/task.py"]
15 changes: 11 additions & 4 deletions datalake/backend/processing/check_stac_metadata/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
FROM ubuntu:20.04 as build

RUN apt-get update \
&& apt-get install -y curl python3-pip \
&& apt-get install --assume-yes --no-install-recommends curl python3-pip \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 -
RUN curl --location --show-error --silent --output get-poetry.py https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py \
&& echo 'bfc42cff9cb49bb74f6a1fe12c37fb08bcf7a49245a441c272dfd25254d8ae39 get-poetry.py' > get-poetry.py.sha256 \
&& sha256sum --check get-poetry.py.sha256 \
&& python3 get-poetry.py \
&& rm get-poetry.py get-poetry.py.sha256
COPY poetry.lock poetry.toml pyproject.toml /opt/
RUN cd /opt && ~/.poetry/bin/poetry install --extras=check-stac-metadata-job --no-dev
WORKDIR /opt
RUN ~/.poetry/bin/poetry install --extras=check-stac-metadata-job --no-dev


FROM ubuntu:20.04

ENTRYPOINT ["/opt/.venv/bin/python", "/opt/task.py"]

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y python3 && rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-get install --assume-yes --no-install-recommends python3 \
&& rm -rf /var/lib/apt/lists/*

COPY --from=build /opt/.venv /opt/.venv

Expand Down
Empty file added ignored: - DL3000 - SC1010
Empty file.