Docker Community Forums

Share and learn in the Docker community.

ERROR: 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
ERROR: 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

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 /usr/src/flask-app/
COPY templates/index.html /usr/src/flask-app/templates/

tell the port number the container should expose


run the flask-application

CMD [“python”, “/usr/src/flask-app/”]

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

Thanks / Ravi