Docker Build - HTTP错误503服务器错误:后端运行状况不佳

时间:2018-04-16 16:31:34

标签: docker pip dockerfile http-error

问题: - 此错误引用的后端是什么时候引用 - "因为错误503服务器错误:后端对于URL https://files.pythonhosted.org/packages/不健康....

使用Dockerfile进行构建。图像是在几个小时后用相同的Dockerfile构建的。现在得到这个错误 -

enter image description here

整个追踪:

dhankar@dhankar-VPCEB44EN:/media/dhankar/Dhankar_1/a2_18/a2___DC_API/aa___Docker_RESTAPI$ sudo docker build -t ddrohit/dck1 .
Sending build context to Docker daemon  1.862MB
Step 1/11 : FROM ubuntu:xenial
 ---> c9d990395902
Step 2/11 : RUN apt-get update
 ---> Using cache
 ---> 42f625ed03cb
Step 3/11 : RUN apt-get install -y python3 # install python3
 ---> Using cache
 ---> 393d9e7b20ec
Step 4/11 : RUN apt-get install -y python-pip python-dev build-essential
 ---> Using cache
 ---> bb956f271bdd
Step 5/11 : COPY ./ /usr/src/rest_api/
 ---> Using cache
 ---> 50d0d52e8e22
Step 6/11 : WORKDIR /usr/src/rest_api/
 ---> Using cache
 ---> 42e086f6d8c4
Step 7/11 : RUN pip install --upgrade pip
 ---> Running in d56c0d5cafce
Collecting pip
  HTTP error 503 while getting https://files.pythonhosted.org/packages/62/a1/0d452b6901b0157a0134fd27ba89bf95a857fbda64ba52e1ca2cf61d8412/pip-10.0.0-py2.py3-none-any.whl#sha256=86a60a96d85e329962a9e6f6af612cbc11106293dbc83f119802b5bee9874cf3 (from https://pypi.org/simple/pip/)
  Could not install requirement pip from https://files.pythonhosted.org/packages/62/a1/0d452b6901b0157a0134fd27ba89bf95a857fbda64ba52e1ca2cf61d8412/pip-10.0.0-py2.py3-none-any.whl#sha256=86a60a96d85e329962a9e6f6af612cbc11106293dbc83f119802b5bee9874cf3 because of error 503 Server Error: Backend is unhealthy for url: https://files.pythonhosted.org/packages/62/a1/0d452b6901b0157a0134fd27ba89bf95a857fbda64ba52e1ca2cf61d8412/pip-10.0.0-py2.py3-none-any.whl
Could not install requirement pip from https://files.pythonhosted.org/packages/62/a1/0d452b6901b0157a0134fd27ba89bf95a857fbda64ba52e1ca2cf61d8412/pip-10.0.0-py2.py3-none-any.whl#sha256=86a60a96d85e329962a9e6f6af612cbc11106293dbc83f119802b5bee9874cf3 because of HTTP error 503 Server Error: Backend is unhealthy for url: https://files.pythonhosted.org/packages/62/a1/0d452b6901b0157a0134fd27ba89bf95a857fbda64ba52e1ca2cf61d8412/pip-10.0.0-py2.py3-none-any.whl for URL https://files.pythonhosted.org/packages/62/a1/0d452b6901b0157a0134fd27ba89bf95a857fbda64ba52e1ca2cf61d8412/pip-10.0.0-py2.py3-none-any.whl#sha256=86a60a96d85e329962a9e6f6af612cbc11106293dbc83f119802b5bee9874cf3 (from https://pypi.org/simple/pip/)
You are using pip version 8.1.1, however version 10.0.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
The command '/bin/sh -c pip install --upgrade pip' returned a non-zero code: 1
dhankar@dhankar-VPCEB44EN:/media/dhankar/Dhankar_1/a2_18/a2___DC_API/aa___Docker_RESTAPI$ 

我的Dockerfile: -

#
FROM ubuntu:xenial

RUN apt-get update 
RUN apt-get install -y python3 # install python3
RUN apt-get install -y python-pip python-dev build-essential
#
COPY ./ /usr/src/rest_api/
WORKDIR /usr/src/rest_api/
#
RUN pip install -r /usr/src/rest_api/requirements.txt
#
EXPOSE 8000
#
RUN python ./usr/src/rest_api/manage.py migrate
#
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
#
# docker run -p 8888:8000 --name dck1 ddrohit/dck1
#

0 个答案:

没有答案