mirror of
https://github.com/bpatrik/pigallery2.git
synced 2024-11-21 17:56:45 +02:00
updated linting and docker files
This commit is contained in:
parent
7a613ecfe1
commit
b7c2c36c16
9
.github/workflows/dockerfile-hadolint.yml
vendored
9
.github/workflows/dockerfile-hadolint.yml
vendored
@ -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
|
@ -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
|
||||
|
@ -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
|
||||
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user