From c2d1e8cfb461a643db6cccaa94752c4c03020bfa Mon Sep 17 00:00:00 2001 From: Justin Drew <2396364+jdrew82@users.noreply.github.com> Date: Fri, 6 Sep 2024 14:41:26 -0500 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Refactor=20final=20build?= =?UTF-8?q?=20to=20just=20copy=20from=20usr/local=20instead=20of=20re-inst?= =?UTF-8?q?alling=20plugins=20from=20wheels.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was found the reinstall from wheels was causing pyUWSGI to be reinstalled with the non-SSL version. --- environments/Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/environments/Dockerfile b/environments/Dockerfile index ad3e50c3d..8e0d66c4a 100644 --- a/environments/Dockerfile +++ b/environments/Dockerfile @@ -53,15 +53,16 @@ WORKDIR /source # ------------------------------------------------------------------------------------- FROM nautobot-base as nautobot +ARG PYTHON_VER # Copy from base the required python libraries and binaries COPY --from=builder /tmp/dist /tmp/dist COPY --from=builder /opt/nautobot /opt/nautobot +COPY --from=builder /usr/local/lib/python${PYTHON_VER}/site-packages /usr/local/lib/python${PYTHON_VER}/site-packages +COPY --from=builder /usr/local/bin /usr/local/bin # COPY ../packages /source/packages -RUN grep -v /source/plugins /tmp/dist/requirements.txt > /tmp/dist/new_requirements.txt && \ - pip install -r /tmp/dist/new_requirements.txt && \ - pip install /tmp/dist/*.whl && \ - rm -rf /source /tmp/dist && \ - chown -R nautobot:nautobot /opt/nautobot +# Verify that pyuwsgi was installed correctly, i.e. with SSL support +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN pyuwsgi --cflags | sed 's/ /\n/g' | grep -e "^-DUWSGI_SSL$" USER nautobot