【发布时间】:2020-02-26 05:21:27
【问题描述】:
我是 docker 新手,我刚刚安装了它并为我的 django 项目做了一些配置。
当我运行时 docker build . 我收到这些错误 这里有什么问题?
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f1363b604f0>: Failed to establish a new connection: [Errno -3] Try again')': /simple/django/
Dockerfile
FROM python:3.8-alpine
MAINTAINER RAHUL VERMA
ENV PYTHONUNBUFFERED 1
COPY ./requirements.txt /requirements.txt
RUN pip install -r /requirements.txt
RUN mkdir /app
WORKDIR app
COPY ./app /app
RUN adduser -D user
USER user
requirements.txt 文件
Django==2.2
djangorestframework==3.11.0
【问题讨论】:
-
检查您的互联网连接.....
-
我尝试了不同的不同网络并得到了同样的错误。
-
与 docker 网络无关,请检查您是否使用代理或其他东西阻止您与互联网的稳定连接
-
代理服务器已在我的系统设置中关闭
标签: django python-3.x docker dockerfile