Reputation: 1542
I am trying to build a docker image which includes a requirements.txt file, but while running the built its failing to install the dependencies.
here is the docker file content: FROM tiangolo/uwsgi-nginx-flask:flask
> # copy over our requirements.txt file COPY requirements.txt /tmp/
>
> # upgrade pip and install required python packages RUN apt-get update pip install -U pip RUN apt-get update pip install -r
> /tmp/requirements.txt
>
> # copy over our app code COPY ./app /app
requirements.txt:
Flask==0.12.2
pyfiglet==0.7.5
here is the error that is coming up:
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fb04e93a950>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/pip/
but when i am running the requirements as pip install requirements.txt
, then its working fine.
Am i doing anything wrong? can anyone please help me?
Upvotes: 1
Views: 1225