Optimize pip install command

As mentioned by @sdktr the "--install-option" is redundant. The added
"--no-warn-script-location" is used to silence warnings when installing
into a directory that is not on $PATH.
This commit is contained in:
Tobias Genannt 2019-10-31 10:11:33 +01:00
parent f7b526eacd
commit f9662a1e4b

View File

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