how to do docker-compose pip install with a proxy?
I am trying to get a docker-compose build to work. My original Dockerfile was,
And I have requirements.txt as,
Django==1.8.1 gunicorn==19.3.0 psycopg2==2.6 redis==2.10.3
Downloading/unpacking Django==1.8.1 (from -r requirements.txt (line 1)) Cannot fetch index base URL https://pypi.python.org/simple/ Could not find any downloads that satisfy the requirement Django==1.8.1 (from -r requirements.txt (line 1))
I tried to change the Docker file to this and it’s not taking the –proxy pip option,
FROM python:3.4.2-onbuild ENV HTTP_PROXY="http://<PROXY>" ENV PIP_OPTIONS="--proxy $HTTP_PROXY" ADD requirements.txt /requirements.txt RUN pip install --proxy $HTTP_PROXY --requirement /requirements.txt
But, docker-compose doesn’t seem to take the Dockerfile even when I do –no-cache.
One Solution collect form web for “how to do docker-compose pip install with a proxy?”
Does your change work when doing a
docker build manually (not inside composer)?
Once you know you have it working with a normal docker build, you should be able to force docker-compose to rebuild using