Skip to content

Instantly share code, notes, and snippets.

@steveydevey
Created February 4, 2022 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steveydevey/406bbe72ad599402ec7db2b54d4e8eba to your computer and use it in GitHub Desktop.
Save steveydevey/406bbe72ad599402ec7db2b54d4e8eba to your computer and use it in GitHub Desktop.
update docker images, then containers, then prune
# just a handy way to do this since I always forget
# first update all the images:
docker images | grep -v REPOSITORY | awk '{print $1}'| sort | uniq | xargs -L1 docker pull
# then run the docker-compose update command:
docker-compose -f ~/docker-compose.yaml up -d --remove-orphans
# then prune old images
docker image prune -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment