]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Converts tabs to spaces and update EditorConfig for the new files
authorTrenton Holmes <holmes.trenton@gmail.com>
Mon, 25 Apr 2022 16:15:12 +0000 (09:15 -0700)
committerTrenton Holmes <holmes.trenton@gmail.com>
Mon, 25 Apr 2022 18:32:55 +0000 (11:32 -0700)
.editorconfig
.pre-commit-config.yaml
docker-builders/Dockerfile.frontend
docker-builders/Dockerfile.jbig2enc
docker-builders/Dockerfile.pikepdf
docker-builders/Dockerfile.psycopg2
docker-builders/Dockerfile.qpdf
docs/Dockerfile

index 125108a0cb26ce7637e291feeb88ae20f7e43828..8111f01d860f9215f9a029eb8075430c327917ea 100644 (file)
@@ -33,5 +33,5 @@ indent_style = space
 [**/test_*.py]
 max_line_length = off
 
-[Dockerfile]
+[Dockerfile*]
 indent_style = space
index 32998e43286f0e73dc48a77322eec6b8e888b9db..f0bf9bace03d9ecf3b2fe8cfffd949bc9a9cf834 100644 (file)
@@ -47,7 +47,7 @@ repos:
       - id: yesqa
         exclude: "(migrations)"
   - repo: https://github.com/asottile/add-trailing-comma
-    rev: "v2.2.2"
+    rev: "v2.2.3"
     hooks:
       - id: add-trailing-comma
         exclude: "(migrations)"
@@ -64,16 +64,16 @@ repos:
       - id: black
   # Dockerfile hooks
   - repo: https://github.com/AleksaC/hadolint-py
-    rev: v1.19.0
+    rev: v2.10.0
     hooks:
       - id: hadolint
         args:
-          - --ignore
-          - DL3006      # https://github.com/hadolint/hadolint/wiki/DL3006  (doesn't understand FROM with ARG)
           - --ignore
           - DL3008      # https://github.com/hadolint/hadolint/wiki/DL3008  (should probably do this at some point)
           - --ignore
           - DL3013      # https://github.com/hadolint/hadolint/wiki/DL3013  (should probably do this too at some point)
+          - --ignore
+          - DL3003      # https://github.com/hadolint/hadolint/wiki/DL3003  (seems excessive to use WORKDIR so much)
   # Shell script hooks
   - repo: https://github.com/lovesegfault/beautysh
     rev: v6.2.1
index 0caec00304224ac0fb1e3be793d26f0e1bd7c815..26f6c9e15c7386ecec75727c8c0b70ecb82d8fb2 100644 (file)
@@ -8,7 +8,7 @@ COPY ./src-ui /src/src-ui
 
 WORKDIR /src/src-ui
 RUN set -eux \
-       && npm update npm -g \
-       && npm ci --no-optional
+  && npm update npm -g \
+  && npm ci --no-optional
 RUN set -eux \
-       && ./node_modules/.bin/ng build --configuration production
+  && ./node_modules/.bin/ng build --configuration production
index 72429ec0b7a51d7f2828ab5f89a3fb8bf7746535..4bc6331705ad1544f7e26bf987a85b9509f66f9c 100644 (file)
@@ -1,6 +1,6 @@
 # This Dockerfile compiles the jbig2enc library
 # Inputs:
-#              - JBIG2ENC_VERSION - the Git tag to checkout and build
+#    - JBIG2ENC_VERSION - the Git tag to checkout and build
 
 FROM debian:bullseye-slim
 
@@ -32,8 +32,8 @@ RUN apt-get update --quiet \
 ARG JBIG2ENC_VERSION
 
 RUN set -eux \
-       && git clone --quiet --branch $JBIG2ENC_VERSION https://github.com/agl/jbig2enc .
+  && git clone --quiet --branch $JBIG2ENC_VERSION https://github.com/agl/jbig2enc .
 RUN set -eux \
-       && ./autogen.sh
+  && ./autogen.sh
 RUN set -eux \
-       && ./configure && make
+  && ./configure && make
index 7325bcefff8148c0781e2af5bf33d6d39990996a..3d2e5f2358dd3ae40d71d94e309a81c9e1f36a49 100644 (file)
@@ -1,9 +1,9 @@
 # This Dockerfile builds the pikepdf wheel
 # Inputs:
-#              - REPO - Docker repository to pull qpdf from
-#              - QPDF_VERSION - The image qpdf version to copy .deb files from
-#              - PIKEPDF_GIT_TAG - The Git tag to clone and build from
-#              - PIKEPDF_VERSION - Used to force the built pikepdf version to match
+#    - REPO - Docker repository to pull qpdf from
+#    - QPDF_VERSION - The image qpdf version to copy .deb files from
+#    - PIKEPDF_GIT_TAG - The Git tag to clone and build from
+#    - PIKEPDF_VERSION - Used to force the built pikepdf version to match
 
 # Default to pulling from the main repo registry when manually building
 ARG REPO="paperless-ngx/paperless-ngx"
@@ -53,7 +53,7 @@ ARG PIKEPDF_GIT_TAG
 ARG PIKEPDF_VERSION
 
 RUN set -eux \
-       && echo "building pikepdf wheel" \
+  && echo "building pikepdf wheel" \
   # Note the v in the tag name here
   && git clone --quiet --depth 1 --branch "${PIKEPDF_GIT_TAG}" https://github.com/pikepdf/pikepdf.git \
   && cd pikepdf \
index cbfbba7c1b4a277c058179e651709796ab352eac..cfd7ff56aabc0e7b94c9d7dd7479f5774a7a11e0 100644 (file)
@@ -1,7 +1,7 @@
 # This Dockerfile builds the psycopg2 wheel
 # Inputs:
-#              - PSYCOPG2_GIT_TAG - The Git tag to clone and build from
-#              - PSYCOPG2_VERSION - Unused, kept for future possible usage
+#    - PSYCOPG2_GIT_TAG - The Git tag to clone and build from
+#    - PSYCOPG2_VERSION - Unused, kept for future possible usage
 
 FROM python:3.9-slim-bullseye
 
@@ -25,7 +25,7 @@ RUN set -eux \
   && apt-get update --quiet \
   && apt-get install --yes --quiet --no-install-recommends $BUILD_PACKAGES \
   && rm -rf /var/lib/apt/lists/* \
-  && python3 -m pip install --upgrade pip wheel
+  && python3 -m pip install --no-cache-dir --upgrade pip wheel
 
 # Layers after this point change according to required version
 # For better caching, seperate the basic installs from
@@ -35,7 +35,7 @@ ARG PSYCOPG2_GIT_TAG
 ARG PSYCOPG2_VERSION
 
 RUN set -eux \
-       && echo "Building psycopg2 wheel" \
+  && echo "Building psycopg2 wheel" \
   && cd /usr/src \
   && git clone --quiet --depth 1 --branch ${PSYCOPG2_GIT_TAG} https://github.com/psycopg/psycopg2.git \
   && cd psycopg2 \
index c56a515c4c05c4e19a37edc15afc141115ac74a1..770d8c2ee3a0c3d415c6ba75079758b6f7bb4a3b 100644 (file)
@@ -36,16 +36,17 @@ ARG QPDF_VERSION
 # In order to get the required version of qpdf, it is backported from bookwork
 # and then built from source
 RUN set -eux \
-       && echo "Building qpdf" \
-  && echo "deb-src http://deb.debian.org/debian/ bookworm main" | tee /etc/apt/sources.list.d/bookworm-src.list \
+  && echo "Building qpdf" \
+  && echo "deb-src http://deb.debian.org/debian/ bookworm main" > /etc/apt/sources.list.d/bookworm-src.list \
   && apt-get update \
   && mkdir qpdf \
   && cd qpdf \
   && apt-get source --yes --quiet qpdf=${QPDF_VERSION}-1/bookworm \
   && rm -rf /var/lib/apt/lists/* \
   && cd qpdf-$QPDF_VERSION \
+  # We don't need to build the tests (also don't run them)
+  && rm -rf libtests \
   && DEBEMAIL=hello@paperless-ngx.com debchange --bpo \
-       && export DEB_BUILD_OPTIONS="terse nocheck nodoc parallel=2" \
+  && export DEB_BUILD_OPTIONS="terse nocheck nodoc parallel=2" \
   && dpkg-buildpackage --build=binary --unsigned-source --unsigned-changes \
-  && pwd \
   && ls -ahl ../*.deb
index 9fb8bd0ccc9dd61bb35ce81ffbef73774de4abca..bb4b35e2deffdc9fa493f4d50548176792418f86 100644 (file)
@@ -1,10 +1,10 @@
 FROM python:3.5.1
 
 # Install Sphinx and Pygments
-RUN pip install Sphinx Pygments
+RUN pip install --no-cache-dir Sphinx Pygments \
+  # Setup directories, copy data
+  && mkdir /build
 
-# Setup directories, copy data
-RUN mkdir /build
 COPY . /build
 WORKDIR /build/docs