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” ]