Fixes #170 - "drf-yasg" installed into wrong dir

With the new multistage build the pip install command put some packages
in the wrong directory. This resuled in them not being copied into the
runtime images. This commit add the additional "--prefix" option to the
install command. After that all test run and we no longer get the error
"ModuleNotFoundError: No module named 'drf_yasg'".
This commit is contained in:
Tobias Genannt 2019-10-24 16:24:12 +02:00 committed by Christian Mäder
parent 63174f85ae
commit e3f632d77f
1 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ RUN apk add --no-cache \
WORKDIR /install
RUN pip install --install-option="--prefix=/install" \
RUN pip install --prefix="/install" --install-option="--prefix=/install" \
# gunicorn is used for launching netbox
gunicorn \
greenlet \
@ -30,7 +30,7 @@ RUN pip install --install-option="--prefix=/install" \
ARG NETBOX_PATH
COPY ${NETBOX_PATH}/requirements.txt /
RUN pip install --install-option="--prefix=/install" -r /requirements.txt
RUN pip install --prefix="/install" --install-option="--prefix=/install" -r /requirements.txt
###
# Main stage