Skip to content

Commit

Permalink
updated linting and docker files
Browse files Browse the repository at this point in the history
  • Loading branch information
grasdk committed Oct 25, 2024
1 parent 7a613ec commit b7c2c36
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 13 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/dockerfile-hadolint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,8 @@ jobs:
with:
dockerfile: ./docker/debian-bullseye/Dockerfile.build
config: ./docker/.config/hadolint.yml
- name: Lint Debian Buster Dockerfile
- name: Lint Debian Bullseye Self-contained Dockerfile
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: ./docker/debian-buster/Dockerfile.build
config: ./docker/.config/hadolint.yml
- name: Lint Debian Buster Self-contained Dockerfile
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: ./docker/debian-buster/selfcontained/Dockerfile
dockerfile: ./docker/debian-bullseye/selfcontained/Dockerfile
config: ./docker/.config/hadolint.yml
3 changes: 1 addition & 2 deletions docker/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ To quality check your dockerfile changes you can use hadolint:
3. Run hadolint on the alpine dockerfile: `docker run --rm -i -v ./.config/hadolint.yml:/.config/hadolint.yaml hadolint/hadolint < ./alpine/Dockerfile.build`
4. Run hadolint on the debian-bookworm dockerfile: `docker run --rm -i -v ./.config/hadolint.yml:/.config/hadolint.yaml hadolint/hadolint < ./debian-bookworm/Dockerfile.build`
5. Run hadolint on the debian-bullseye dockerfile: `docker run --rm -i -v ./.config/hadolint.yml:/.config/hadolint.yaml hadolint/hadolint < ./debian-bullseye/Dockerfile.build`
6. Run hadolint on the debian-buster dockerfile: `docker run --rm -i -v ./.config/hadolint.yml:/.config/hadolint.yaml hadolint/hadolint < ./debian-buster/Dockerfile.build`
7. Run hadolint on the debian-buster selfcontained dockerfile: `docker run --rm -i -v ./.config/hadolint.yml:/.config/hadolint.yaml hadolint/hadolint < ./debian-buster/selfcontained/Dockerfile`
7. Run hadolint on the debian-bullseye selfcontained dockerfile: `docker run --rm -i -v ./.config/hadolint.yml:/.config/hadolint.yaml hadolint/hadolint < ./debian-bullseye/selfcontained/Dockerfile`
8. Fix errors and warnings or add them to ignore list of the [hadolint configuration file](./.config/hadolint.yml) if there is a good reason for that. Read more [here](https://github.com/hadolint/hadolint).

### Building the docker image locally
Expand Down
4 changes: 2 additions & 2 deletions docker/alpine/Dockerfile.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#-----------------BUILDER-----------------
#-----------------------------------------
FROM node:18-alpine3.17 AS builder
RUN apk add --update-cache --repository https://alpine.global.ssl.fastly.net/alpine/v3.17/community/ \
RUN apk add --no-cache --repository https://alpine.global.ssl.fastly.net/alpine/v3.17/community/ \
python3 build-base sqlite-dev sqlite-libs imagemagick-dev libraw-dev vips-dev vips-heif vips-magick fftw-dev gcc g++ make libc6-compat && ln -snf /usr/bin/python3 /usr/bin/python
COPY pigallery2-release /app
WORKDIR /app
Expand All @@ -26,7 +26,7 @@ ENV NODE_ENV=production \
PI_DOCKER=true

EXPOSE 80
RUN apk add --update-cache --repository https://alpine.global.ssl.fastly.net/alpine/v3.17/community/ \
RUN apk add --no-cache --repository https://alpine.global.ssl.fastly.net/alpine/v3.17/community/ \
vips vips-cpp vips-heif vips-magick ffmpeg
COPY --from=builder /app /app

Expand Down
2 changes: 1 addition & 1 deletion docker/debian-bookworm/Dockerfile.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#-----------------BUILDER-----------------
#-----------------------------------------
FROM node:18-bookworm AS builder
RUN apt update && apt install -y --no-install-recommends libvips-dev python3
RUN apt-get update && apt-get install -y --no-install-recommends libvips-dev python3
COPY pigallery2-release /app
WORKDIR /app
RUN npm install --unsafe-perm --fetch-timeout=90000
Expand Down
2 changes: 1 addition & 1 deletion docker/debian-bullseye/Dockerfile.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#-----------------BUILDER-----------------
#-----------------------------------------
FROM node:18-bullseye AS builder
RUN apt update && apt install -y --no-install-recommends libvips-dev python3
RUN apt-get update && apt-get install -y --no-install-recommends libvips-dev python3
COPY pigallery2-release /app
WORKDIR /app
RUN npm install --unsafe-perm --fetch-timeout=90000
Expand Down

0 comments on commit b7c2c36

Please sign in to comment.