Updating local versions of Docker images if using the latest tag
source link: https://www.kevinhooke.com/2024/04/22/updating-local-versions-of-docker-images-if-using-the-latest-tag/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Updating local versions of Docker images if using the latest tag
I have an ubuntu:latest image pulled locally from a couple of years ago, and it’s obviously not the latest since it’s over 2 years old. ‘docker images’ shows:
ubuntu latest d5ca7a445605 2 years ago 65.6MB
If I run the image with -it and cat the /etc/lsb-release file, it shows it’s 20.04. Docker Hub is currently showing latest as 22.04.
To update it, if I ‘docker pull ubuntu:latest’ then it shows:
> docker pull ubuntu:latest
latest: Pulling from library/ubuntu
70104cd59e2a: Pull complete
Digest: sha256:1b8d8ff4777f36f19bfe73ee4df61e3a0b789caeff29caa019539ec7c9a57f95
Status: Downloaded newer image for ubuntu:latest
docker.io/library/ubuntu:latest
If I now start it and cat /etc/lsb-release, it shows 22.04. Done!
CategoriesTech NotesTagsdocker, ubuntu
Leave a Reply Cancel reply
Your email address will not be published. Required fields are marked *
Comment *
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I comment.
Notify me of follow-up comments by email.
Notify me of new posts by email.
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Post navigation
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK