I have the following Dockerfile
and as you can see I'm using python:3.10.4
as a base image
FROM python:3.10.4
WORKDIR /app
COPY . .
CMD ["python", "bmi.py"]
After I build the image using docker build
the image built successfully and I can see it when I list the images.
however the base image which is python
with the tag 3.10.4
is not showing
note that when I build another image of my Dockerfile, I can see from the output that the base image python:3.10.4
is loaded from the cache.
And that means the base image python:3.10.4
is installed and cached successfully but why it is not showing when I list the images, even when I use the -a
flag, like the following
docker image ls -a
my docker version is Docker version 20.10.13, build a224086
my OS is windows 10
CodePudding user response:
It looks like you're using Docker buildkit.
While the traditional docker build
mechanism would pull referenced images into the local image collection, buildkit has its own caching mechanism and the images it pulls won't show up in the output of docker image ls
.