Skip to content

Instantly share code, notes, and snippets.

@mercuriete
Last active August 17, 2019 14:36
Show Gist options
  • Save mercuriete/c5585b4cd290efcc4b707b27b799d36d to your computer and use it in GitHub Desktop.
Save mercuriete/c5585b4cd290efcc4b707b27b799d36d to your computer and use it in GitHub Desktop.
one line script for pull all docker images
#!/bin/bash
#pulls all docker images you have locally
docker images | tr -s ' ' | cut -d " " -f 1,2 | tr ' ' ':' | tail -n +2 | grep -v none | xargs -L1 docker pull
@rogervila
Copy link

Example using awk

docker images | awk '{print $1":"$2}' | grep -v 'none' | grep -iv 'repo' | xargs -n1 docker pull

https://gist.github.com/rogervila/97360be2339e23afe568e85f49358023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment