From f9662a1e4bf5dd64a9520f401f0a21c512d2a21d Mon Sep 17 00:00:00 2001 From: Tobias Genannt Date: Thu, 31 Oct 2019 10:11:33 +0100 Subject: [PATCH] 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. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5b0ae47..fd42274 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ RUN apk add --no-cache \ 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 \ greenlet \ @@ -30,7 +30,7 @@ RUN pip install --prefix="/install" --install-option="--prefix=/install" \ ARG NETBOX_PATH 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