mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Adds a CI job for hadolint over all the Dockerfiles, fixes the minor thing it complained about
This commit is contained in:
		
							
								
								
									
										23
									
								
								.github/workflows/reusable-ci-backend.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										23
									
								
								.github/workflows/reusable-ci-backend.yml
									
									
									
									
										vendored
									
									
								
							| @@ -106,3 +106,26 @@ jobs: | ||||
|         run: | | ||||
|           cd src/ | ||||
|           pipenv run coveralls --service=github | ||||
|  | ||||
|   dockerfile-lint: | ||||
|     name: "Lint ${{ matrix.dockerfile }}" | ||||
|     runs-on: ubuntu-20.04 | ||||
|     strategy: | ||||
|       matrix: | ||||
|         dockerfile: | ||||
|           - Dockerfile | ||||
|           - docker-builders/Dockerfile.qpdf | ||||
|           - docker-builders/Dockerfile.jbig2enc | ||||
|           - docker-builders/Dockerfile.psycopg2 | ||||
|           - docker-builders/Dockerfile.pikepdf | ||||
|       fail-fast: false | ||||
|     steps: | ||||
|       - | ||||
|         name: Checkout | ||||
|         uses: actions/checkout@v3 | ||||
|       - | ||||
|         uses: hadolint/hadolint-action@v2.0.0 | ||||
|         with: | ||||
|           failure-threshold: warning | ||||
|           dockerfile: ${{ matrix.dockerfile }} | ||||
|           ignore: DL3008,DL3013,DL3003 | ||||
|   | ||||
							
								
								
									
										27
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								Dockerfile
									
									
									
									
									
								
							| @@ -117,19 +117,18 @@ COPY gunicorn.conf.py . | ||||
| # setup docker-specific things | ||||
| # Use mounts to avoid copying installer files into the image | ||||
| # These change sometimes, but rarely | ||||
| ARG DOCKER_SRC=/usr/src/paperless/src/docker/ | ||||
| WORKDIR ${DOCKER_SRC} | ||||
| WORKDIR /usr/src/paperless/src/docker/ | ||||
|  | ||||
| COPY [ \ | ||||
| 	"docker/imagemagick-policy.xml", \ | ||||
| 	"docker/supervisord.conf", \ | ||||
| 	"docker/docker-entrypoint.sh", \ | ||||
| 	"docker/docker-prepare.sh", \ | ||||
| 	"docker/paperless_cmd.sh", \ | ||||
| 	"docker/wait-for-redis.py", \ | ||||
| 	"docker/management_script.sh", \ | ||||
| 	"docker/install_management_commands.sh", \ | ||||
| 	"${DOCKER_SRC}" \ | ||||
|   "docker/imagemagick-policy.xml", \ | ||||
|   "docker/supervisord.conf", \ | ||||
|   "docker/docker-entrypoint.sh", \ | ||||
|   "docker/docker-prepare.sh", \ | ||||
|   "docker/paperless_cmd.sh", \ | ||||
|   "docker/wait-for-redis.py", \ | ||||
|   "docker/management_script.sh", \ | ||||
|   "docker/install_management_commands.sh", \ | ||||
|   "/usr/src/paperless/src/docker/" \ | ||||
| ] | ||||
|  | ||||
| RUN set -eux \ | ||||
| @@ -162,15 +161,15 @@ RUN --mount=type=bind,from=qpdf-builder,target=/qpdf \ | ||||
|     && apt-get install --yes --no-install-recommends /qpdf/usr/src/qpdf/libqpdf28_*.deb \ | ||||
|     && apt-get install --yes --no-install-recommends /qpdf/usr/src/qpdf/qpdf_*.deb \ | ||||
|   && echo "Installing pikepdf and dependencies" \ | ||||
|     && python3 -m pip install --no-cache-dir /pikepdf/usr/src/wheels/pyparsing*.whl \ | ||||
|     && python3 -m pip install --no-cache-dir /pikepdf/usr/src/wheels/packaging*.whl \ | ||||
|     && python3 -m pip install --no-cache-dir /pikepdf/usr/src/wheels/lxml*.whl \ | ||||
|     && python3 -m pip install --no-cache-dir /pikepdf/usr/src/wheels/Pillow*.whl \ | ||||
|     && python3 -m pip install --no-cache-dir /pikepdf/usr/src/wheels/pyparsing*.whl \ | ||||
|     && python3 -m pip install --no-cache-dir /pikepdf/usr/src/wheels/pikepdf*.whl \ | ||||
|     && python -m pip list \ | ||||
|     && python3 -m pip list \ | ||||
|   && echo "Installing psycopg2" \ | ||||
|     && python3 -m pip install --no-cache-dir /psycopg2/usr/src/wheels/psycopg2*.whl \ | ||||
|     && python -m pip list | ||||
|     && python3 -m pip list | ||||
|  | ||||
| # Python dependencies | ||||
| # Change pretty frequently | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Trenton Holmes
					Trenton Holmes