Docker image disappeared somehow

System: Ubuntu 19.04
Docker Engine: 20.10.5
API version: 1.41

When I pull a new image, it will dissppeared in a few minutes.I didn’t do anything.

Disappears from where exactly? Please show the commands and their output to illustrate the issue.

  1. execute docker pull ubuntu
  2. Wait a few minutes to execute docker image ls,no ubuntu image

This behavior would make sense if you use Docker Desktop with enabled feature “Use containerd for pulling and storing images”, which indicates the behavior you are seeing “Only images and containers in the active image store are visible. All your other containers and images still exist. To see them again, turn off this feature.”

But if you are using docker-ce, then I can only guess that a cronjob might be running that executes something like docker image prune -a -f every couple of minutes.

If both is not the case: no idea.

Yes, I installed k8s.The above behavior is in the master node,and the child nodes have no problems.Can I save unused image?