My django file requirement.txt is installing while running in docker through cmd on my Window 10

Dockerfile

FROM python:3.8-slim-buster

WORKDIR /main

COPY requirements.txt requirements.txt

RUN pip install -r requirements.txt

COPY . .

EXPOSE 8000

CMD python manage.py runserver

In my cmd/terminal:

E:\Satya_Django_TODO_APP\todo>docker build -t my_image --rm . [+] Building 95.5s (8/9) => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 32B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/python:3.8-slim-buster 2.2s => [1/5] FROM docker.io/library/python:3.8-slim-buster@sha256:0b92aced9b0e52b16870a7c09 0.0s => [internal] load build context 0.1s => => transferring context: 28.89kB 0.0s => CACHED [2/5] WORKDIR /main 0.0s => CACHED [3/5] COPY requirements.txt requirements.txt 0.0s => ERROR [4/5] RUN pip3 install -r requirements.txt 93.0s

[4/5] RUN pip3 install -r requirements.txt: #8 13.02 WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f04029205e0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/aioredis/ #8 15.23 Collecting aioredis==1.3.1 #8 25.24 WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f0402d7c4c0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /packages/b0/64/1b1612d0a104f21f80eb4c6e1b6075f2e6aba8e228f46f229cfd3fdac859/aioredis-1.3.1-py3-none-any.whl #8 35.75 WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f0402d7c730>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /packages/b0/64/1b1612d0a104f21f80eb4c6e1b6075f2e6aba8e228f46f229cfd3fdac859/aioredis-1.3.1-py3-none-any.whl #8 46.77 WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f0402d7c910>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /packages/b0/64/1b1612d0a104f21f80eb4c6e1b6075f2e6aba8e228f46f229cfd3fdac859/aioredis-1.3.1-py3-none-any.whl #8 58.78 WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f0402d7cb20>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /packages/b0/64/1b1612d0a104f21f80eb4c6e1b6075f2e6aba8e228f46f229cfd3fdac859/aioredis-1.3.1-py3-none-any.whl #8 72.80 WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f0402d7cca0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /packages/b0/64/1b1612d0a104f21f80eb4c6e1b6075f2e6aba8e228f46f229cfd3fdac859/aioredis-1.3.1-py3-none-any.whl #8 82.81 ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/b0/64/1b1612d0a104f21f80eb4c6e1b6075f2e6aba8e228f46f229cfd3fdac859/aioredis-1.3.1-py3-none-any.whl (Caused by NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f0402d7ce50>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')) #8 82.81


executor failed running [/bin/sh -c pip3 install -r requirements.txt]: exit code: 1

why my connection is not establishing ? i haven't found any exact answer till now

Back to Top