Created
February 4, 2022 21:18
-
-
Save steveydevey/406bbe72ad599402ec7db2b54d4e8eba to your computer and use it in GitHub Desktop.
update docker images, then containers, then prune
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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