From 81a8a42f279ee214e892c124f61af104a209fa14 Mon Sep 17 00:00:00 2001 From: Fabian Peter Hammerle Date: Sat, 4 Nov 2023 23:27:28 +0100 Subject: [PATCH] test --- Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d9e5c64..cd7c217 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,15 +10,19 @@ ARG SOURCE_DIR_PATH=/switchbot-mqtt FROM $BASE_IMAGE as build RUN apk add --no-cache \ + cargo `# cryptography build` \ gcc \ git `# setuptools_scm` \ glib-dev \ jq `# edit Pipfile.lock` \ make \ musl-dev \ + openssl-dev `# cryptography build` \ py3-certifi `# pipenv` \ py3-pip `# pipenv install` \ py3-virtualenv `# pipenv` \ + python3-dev `# Python.h for cffi build` \ + rust `# cryptography build` \ && adduser -S build USER build @@ -33,9 +37,10 @@ ENV PIPENV_CACHE_DIR=/tmp/pipenv-cache \ # `sponge` is not pre-installed RUN jq 'del(.default."switchbot-mqtt", .default."sanitized-package")' Pipfile.lock > Pipfile.lock~ \ && mv Pipfile.lock~ Pipfile.lock \ - && pipenv install --deploy --verbose + && pipenv install --deploy COPY --chown=build:nobody . $SOURCE_DIR_PATH -RUN pipenv install --deploy --verbose \ +RUN if ! git status; then export SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0; fi \ + && pipenv install --deploy \ && pipenv graph \ && pipenv run pip freeze \ && rm -rf .git/ $PIPENV_CACHE_DIR \