I am building an app that has a dependency available on a private Pypi server.
My Dockerfile looks like this:
FROM python:3.6
WORKDIR /src/mylib
COPY . ./
RUN pip install .
I want pip to use the extra server to install the dependencies. So I'm trying to pass the PIP_EXTRA_INDEX_URL environment variable during the build phase like so:
"docker build --pull -t $IMAGE_TAG --build-arg PIP_EXTRA_INDEX_URL=$PIP_EXTRA_INDEX_URL ."
For some reason it is not working as intended, and RUN echo $PIP_EXTRA_INDEX_URL returns nothing.
What is wrong?