Docker Community Forums

Share and learn in the Docker community.

Image automagically being deleted from cache


(Datinc) #1

I am running Docker (edge channel) on Mac. Recently I have noticed images I have already downloaded, being lost from my image cache and having to be re-downloaded. There doesn’t seem to be any rhyme or reason to it.

For example I could pull the mysql image. And 5 minutes, maybe 1 hour, maybe a day later when I go to run that image it will re-download.

Here is a perfect example. I just built the following image (took forever because it had to compile R-script libraries):


** help
*** installing help indices
** building package indices
** testing if installed package can be loaded

  • DONE (rsconnect)

The downloaded source packages are in
‘/tmp/RtmpBf5M6e/downloaded_packages’
Removing intermediate container 3379463fb28b
—> e4d9aaa33b49
Step 12/12 : ENTRYPOINT [ “Rscript” ]
—> Running in bb37dc64a956
Removing intermediate container bb37dc64a956
—> 73992335d89d
Successfully built 73992335d89d
Successfully tagged pred:latest

~/code/products/pred/ [okta: expired] on git : master
› docker run -e “PROCESS_NUMBER=1” -e “LANES_PER_BATCH=10” -e “BATCH_NAME=pred01” pred:latest main.R
Unable to find image ‘pred:latest’ locally

› docker run -e “PROCESS_NUMBER=1” -e “LANES_PER_BATCH=10” -e “BATCH_NAME=pred01” 73992335d89d main.R
Unable to find image ‘73992335d89d:latest’ locally

As you can see, it says Successfully built 73992335d89d and tagged it. I immediately to try run that image (tried both by the tag and the image ID). In both cases it says Unable to find image and tries to pull it.

If I check output of docker images

› docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
pred 9dcef502ac0f 6 hours ago 2.97GB

You can see the latest is from 6 hours ago and the Image ID is not what is shown above.

What the heck is going on here?