Update all Docker Images

Unfortunately, Docker does not have a command to update all images however this command will accomplish the same:

sudo docker images |grep -v REPOSITORY|awk '{print $1}'|sudo xargs -L1 docker pull

Credit: https://www.googlinux.com/how-to-update-all-docker-images/

Use this as a bash alias:
update-images () {
      sudo docker images |grep -v REPOSITORY|awk '{print $1}'|sudo xargs -L1 docker pull
}

This is being used as a bash function due to the complication of using ' wiithin the command.


Cover photo credit: https://unsplash.com/@sebastiansvenson

Last modified: 31st October 2021

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.