I cannot find the path to Dockerfile hence getting the same error
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /root/Dockerfile: no such file or directory
Can you help me find the directory where Dockerfile is stored i tried cd command as well to search but coudnt find Dockerfile in any directory.
Build a new smaller docker image by modifying the same Dockerfile and name it webapp-color and tag it lite .
Hint: Find a smaller base image for python:3.6 . Make sure the final image is less than 150MB .
How do we find the size of the docker image in the docker hub?
I tried using docker search command - > docker search python:3.6, but it doesn’t provide the size of the image.
Let me know if there is away to find the size of the docker image before pulling it.
When you search for a docker image on Docker hub , there will be 2 tabs- Repo Info and Tags . Open Tags tab and you will see the sizes of all the types of images you can pull for that image
@mmumshad I’m getting the below error when I try to build dockerfile using tag webapp-color.
$ docker build . -t webapp-color
Sending build context to Docker daemon 121.3kB
Step 1/6 : FROM python:3.6
—> f3411dca4721
Step 2/6 : RUN pip install flask
—> Running in 38c5fec65ebb
ERROR: Could not find a version that satisfies the requirement flask (from versions: none)
ERROR: No matching distribution found for flask
The command ‘/bin/sh -c pip install flask’ returned a non-zero code: 1
The issue is the symbolic link is not created, either you can create symbolic link or else move to the directory webapp-color and execute the command.
I assume you are in the root directory, run this command to find your directory “PWD”
if it says /root, then
$cd webapp-color
$docker build -t webapp-color .
That should work without any issues.
Cheers, all the best…
What is the answer of question 14 at the labs Docker images…
Question is this?
Build a new smaller docker image by modifying the same Dockerfile and name it webapp-color and tag it lite .
Hint: Find a smaller base image for python:3.6 . Make sure the final image is less than 150MB .