Docker Community Forums

Share and learn in the Docker community.

ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.5/main: temporary error (try again later)

Hi Guys,

I am new to Docker and started learning it by going the available course.

I am struck with below error when I started playing the snippet from the course from section 2.3.3 Build the image

support@host:~/flask-app$ docker build -t poojari/myfirstapp .
Sending build context to Docker daemon 8.192 kB
Step 1/8 : FROM alpine:3.5
—> 88e169ea8f46
Step 2/8 : RUN apk add --update py2-pip --no-cache
—> Running in e062c2cc9121
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.5/main: temporary error (try again later)



ERROR: unsatisfiable constraints:
py2-pip (missing):
required by: world[py2-pip]
The command ‘/bin/sh -c apk add --update py2-pip --no-cache’ returned a non-zero code: 1
support@host:~/flask-app$

DockerFile contents
support@host:~/flask-app$ cat Dockerfile

our base image

FROM alpine:3.5

Install python and pip

RUN apk add --update py2-pip --no-cache

install Python modules needed by the Python flask-app

COPY requirements.txt /usr/src/flask-app/
RUN pip install --no-cache-dir -r /usr/src/flask-app/requirements.txt

copy files required for the flask-app to run

COPY app.py /usr/src/flask-app/
COPY templates/index.html /usr/src/flask-app/templates/

tell the port number the container should expose

EXPOSE 5000

run the flask-application

CMD [“python”, “/usr/src/flask-app/app.py”]
support@host:~/flask-app$

Please help as I am beginner in this course and not sure where the problem is

Thanks / Ravi