From ac242c01c181908771df229ab8dd01b5963c91af Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 13 Oct 2021 00:46:46 +1100 Subject: [PATCH 1/3] Updates for building cryptography lib --- docker/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index f2aa590ad1..dd78d6234d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -9,6 +9,9 @@ ARG tag="" ENV PYTHONUNBUFFERED 1 +# Ref: https://github.com/pyca/cryptography/issues/5776 +ENV CRYPTOGRAPHY_DONT_BUILD_RUST 1 + # InvenTree key settings # The INVENTREE_HOME directory is where the InvenTree source repository will be located @@ -70,7 +73,7 @@ RUN apk add --no-cache git make bash \ # MySQL/MariaDB support mariadb-connector-c mariadb-dev mariadb-client \ # Required for python cryptography support - rust cargo + openssl-dev musl-dev libffi-dev rust cargo # Install required base-level python packages COPY requirements.txt requirements.txt From c3e0c9378f3529763f6433d3ed5282a84cf6d687 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 13 Oct 2021 00:52:48 +1100 Subject: [PATCH 2/3] Upgrade pip as part of dockerfile --- docker/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index dd78d6234d..959d333d52 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -75,6 +75,9 @@ RUN apk add --no-cache git make bash \ # Required for python cryptography support openssl-dev musl-dev libffi-dev rust cargo +# Update pip +RUN pip install --upgrade pip + # Install required base-level python packages COPY requirements.txt requirements.txt RUN pip install --no-cache-dir -U -r requirements.txt @@ -133,4 +136,3 @@ ENTRYPOINT ["/bin/bash", "./docker/init.sh"] # Launch the development server CMD ["invoke", "server", "-a", "${INVENTREE_WEB_ADDR}:${INVENTREE_WEB_PORT}"] - From 1832a6f1facb0e8df07e3a19ce290fe42d85b066 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 13 Oct 2021 00:53:41 +1100 Subject: [PATCH 3/3] Run APK upgrade Ref: --- docker/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index 959d333d52..be8479724e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -54,6 +54,8 @@ LABEL org.label-schema.schema-version="1.0" \ # Create user account RUN addgroup -S inventreegroup && adduser -S inventree -G inventreegroup +RUN apk -U upgrade + # Install required system packages RUN apk add --no-cache git make bash \ gcc libgcc g++ libstdc++ \