Skip to content

Commit

Permalink
Fix linting and require linted Dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
GaretJax committed Nov 6, 2023
1 parent 0c0d9e9 commit d5bc88e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
1 change: 0 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ linting:
image: divio/lint
stage: qa
needs: []
allow_failure: true
script:
- find .
-type f
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
lint:
find . -type f -name Dockerfile -not -path './EOL-*' -print0 | \
xargs -0 -I% \
docker run -v $(shell pwd):/app -e LINT_FILE_DOCKER=% divio/lint \
/bin/lint --run=docker
5 changes: 3 additions & 2 deletions py3.11-alpine3.18/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# hadolint global ignore=DL3059
FROM python:3.11-alpine3.18 AS build

ARG TARGET=prod
Expand All @@ -7,7 +8,7 @@ RUN apk update && apk upgrade

# Dependencies
# hadolint ignore=DL3018
RUN apk add \
RUN apk add --no-cache \
curl \
freetype \
gdal \
Expand All @@ -31,7 +32,7 @@ RUN apk add \
yaml

# hadolint ignore=DL3018
RUN if [ "$TARGET" = "dev" ] ; then apk add \
RUN if [ "$TARGET" = "dev" ] ; then apk add --no-cache \
autoconf \
automake \
blas-dev \
Expand Down
4 changes: 2 additions & 2 deletions py3.7-alpine3.12/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apk update && apk upgrade

# Dependencies
# hadolint ignore=DL3018
RUN apk add \
RUN apk add --no-cache \
blas \
cairo \
curl \
Expand All @@ -34,7 +34,7 @@ RUN apk add \
yaml

# hadolint ignore=DL3018
RUN if [ "$TARGET" = "dev" ] ; then apk add \
RUN if [ "$TARGET" = "dev" ] ; then apk add --no-cache \
autoconf \
automake \
cairo-dev \
Expand Down
5 changes: 3 additions & 2 deletions py3.9-alpine3.13/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# hadolint global ignore=DL3059
FROM python:3.9.9-alpine3.13 AS build

ARG TARGET=prod
Expand All @@ -7,7 +8,7 @@ RUN apk update && apk upgrade

# Dependencies
# hadolint ignore=DL3018
RUN apk add \
RUN apk add --no-cache \
blas \
curl \
freetype \
Expand All @@ -32,7 +33,7 @@ RUN apk add \
yaml

# hadolint ignore=DL3018
RUN if [ "$TARGET" = "dev" ] ; then apk add \
RUN if [ "$TARGET" = "dev" ] ; then apk add --no-cache \
autoconf \
automake \
blas-dev \
Expand Down

0 comments on commit d5bc88e

Please sign in to comment.