Skip to content

Instantly share code, notes, and snippets.

@ncherro
Created June 4, 2018 16:53
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 ncherro/d852a9237fd2e054386b8b3a02cf867f to your computer and use it in GitHub Desktop.
Save ncherro/d852a9237fd2e054386b8b3a02cf867f to your computer and use it in GitHub Desktop.
Pull fresh docker images
#!/bin/bash
# pull fresh docker images
# docker images with registry.namely.land and production|master|latest
images=$(docker images | grep 'registry.namely.land' | grep 'production\|master\|latest' | awk '{print $1":"$2}')
# loop through images and pull each one
for image in $images
do
docker pull $image
echo ================================
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment