Reputation: 521
Is there a command to update (pull) all the downloaded Docker images at once in the terminal ?
Upvotes: 12
Views: 4348
Reputation: 51
grep v1.0-code_latest docker-compose.yml | awk '{print $2}' | xargs -L1 docker pull
Upvotes: 0
Reputation: 3936
The most "dockerist" way to do it is:
docker images --format "{{.Repository}}:{{.Tag}}" | xargs -L1 docker pull
Upvotes: 4
Reputation: 812
You can use this :
docker images | awk '{print $1":"$2}' | grep -v REPOSITORY | xargs -L1 docker pull
Upvotes: 4
Reputation: 6162
No, there is no built-in command to pull
all docker images
at once.
But you can try this (multiline) bash using docker --format
:
for image in $(docker images --format "{{.Repository}}:{{.Tag}}" | grep -v '<none>')
do
docker pull $image
done
Or in one line:
for image in $(docker images --format "{{.Repository}}:{{.Tag}}" | grep -v '<none>'); do docker pull $image; done;
Upvotes: 12