Skip to content

Commit

Permalink
fix: 🐛 Refactor final build to just copy from usr/local instead of re…
Browse files Browse the repository at this point in the history
…-installing plugins from wheels.

It was found the reinstall from wheels was causing pyUWSGI to be reinstalled with the non-SSL version.
  • Loading branch information
jdrew82 committed Sep 6, 2024
1 parent e850c09 commit c2d1e8c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions environments/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c2d1e8c

Please sign in to comment.