A python app needed to be Dockerized Day 47 (100 Days of DevOps)

Having issues with the activity, I tried multiples ways to accomplish the task and I keep getting the same pip error:

[+] Building 13.8s (8/8) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 223B 0.0s
=> [internal] load metadata for Docker Hub Container Image Library | App Containerization 0.2s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [1/4] FROM Docker Hub Container Image Library | App Containerization 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 97B 0.0s
=> CACHED [2/4] WORKDIR /python_app 0.0s
=> CACHED [3/4] COPY src/* ./ 0.0s
=> ERROR [4/4] RUN pip install -r requirements.txt 13.6s

[4/4] RUN pip install -r requirements.txt:
13.55 runc run failed: unable to start container process: error during container init: error mounting “proc” to rootfs at “/proc”: mount src=proc, dst=/proc, dstFd=/proc/thread-self/fd/8, flags=0xe: no such file or directory


Dockerfile:8

6 | COPY src/* ./
7 |
8 | >>> RUN pip install -r requirements.txt
9 |
10 | EXPOSE 5001

ERROR: failed to build: failed to solve: process “/bin/sh -c pip install -r requirements.txt” did not complete successfully: exit code: 1

I don’t know if I’m doing something wrong or if the lab itself has issues.
This is how my Dockerfile lookslike:
pwd
/python_app

FROM python:3.8

WORKDIR /python_app

Copy ALL files from src directory into container

COPY src/* ./

RUN pip install -r requirements.txt

EXPOSE 5001

CMD [ “python”, “server.py” ]

Hi @jorgebayuelo

This could be a transient issue with this task.

I verified the task, and other than your base-image and COPY instruction, I do not see any difference.
Can you please try this again, by using a base-image without a Tag, as the question does not ask for a specific tagged base image.

Hi @Santosh_KodeKloud

Thank you for taking the time to review this post. I will try with a base Image as you suggest and will let you know if that works for me!

Hey @Santosh_KodeKloud

Just wanted to updated you on this, the docker build worked now but I had to log out of my account and log back in, after that the build worked great. Thank you!