Update all docker images

When you’re running images with the tag latest on you local machine they might need some updates from time to time. With this one liner you pull the newest version in of all the images you already have locally.

Update all images

for image in $(sudo docker image ls | awk '{print $1}' | grep -ve "none\|REPOSITORY" | sort | uniq); do sudo docker pull $image ;done

example

This was on my media management machine:

[svanbroekhoven@ibm729 ~]$ sudo docker image ls | awk '{print $1}' | grep -ve "none\|REPOSITORY" | sort | uniq
linuxserver/nzbget
linuxserver/plex
linuxserver/radarr
linuxserver/sonarr
linuxserver/tautulli
nvidia/cuda
ortho4xp
swarm
ubuntu
[svanbroekhoven@ibm729 ~]$ for image in $(sudo docker image ls | awk '{print $1}' | grep -ve "none\|REPOSITORY" | sort | uniq); do sudo docker pull $image ;done
Using default tag: latest
latest: Pulling from linuxserver/nzbget
Digest: sha256:4c433da392324f885dcb63b7a2aecaa72125a172ffb81761cf34dd3462dd7c65
Status: Image is up to date for linuxserver/nzbget:latest
docker.io/linuxserver/nzbget:latest
Using default tag: latest
latest: Pulling from linuxserver/plex
Digest: sha256:158865b029f109dc9f9460de792d78f1df056188ebf6a720a0bdc1ccde768f2a
Status: Image is up to date for linuxserver/plex:latest
docker.io/linuxserver/plex:latest
Using default tag: latest
latest: Pulling from linuxserver/radarr
Digest: sha256:8dbe3385f3bcd8d16558f6f9e31224f1d3ee994debb90454a7b827c745ff3c6d
Status: Image is up to date for linuxserver/radarr:latest
docker.io/linuxserver/radarr:latest
Using default tag: latest
latest: Pulling from linuxserver/sonarr
Digest: sha256:3c57fca1f14943219b2a4573464ab462ac60b8d8fd0396097b61ef7fc6366970
Status: Image is up to date for linuxserver/sonarr:latest
docker.io/linuxserver/sonarr:latest
Using default tag: latest
latest: Pulling from linuxserver/tautulli
Digest: sha256:9e3201491b9e6dce3ab476145a24371ce420e44ad042614ba46a69ffe3168672
Status: Image is up to date for linuxserver/tautulli:latest
docker.io/linuxserver/tautulli:latest
Using default tag: latest
latest: Pulling from nvidia/cuda
Digest: sha256:31e2a1ca7b0e1f678fb1dd0c985b4223273f7c0f3dbde60053b371e2a1aee2cd
Status: Image is up to date for nvidia/cuda:latest
docker.io/nvidia/cuda:latest
Using default tag: latest
Error response from daemon: pull access denied for ortho4xp, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Using default tag: latest
latest: Pulling from library/swarm
Digest: sha256:b866583a3b8791bcd705b7bc0fd94c66b695a1a2dbaeb5f59ed29940e5015dc8
Status: Image is up to date for swarm:latest
docker.io/library/swarm:latest
Using default tag: latest
latest: Pulling from library/ubuntu
Digest: sha256:250cc6f3f3ffc5cdaa9d8f4946ac79821aafb4d3afc93928f0de9336eba21aa4
Status: Image is up to date for ubuntu:latest
docker.io/library/ubuntu:latest
[svanbroekhoven@ibm729 ~]$
Avatar
Stein van Broekhoven
Cloud & Open-Source magician 🧙‍♂️

I try to find the KISS in complex systems and share it with the world.

comments powered by Disqus