Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Update all Docker images
docker images | grep -v REPOSITORY | awk '{print $1}' | xargs -L1 docker pull
@bradynpoulsen

This comment has been minimized.

Copy link

commented Aug 2, 2017

I find that I have multiple versions of an image, adding a uniq -u squashes it down to unique lines

$ docker images | grep -v REPOSITORY | awk '{print $1}' | uniq -u | xargs -L1 docker pull 
@TheCjw

This comment has been minimized.

Copy link

commented Aug 23, 2017

update from current TAG

# docker images | grep -v REPOSITORY | awk '{printf("%s:%s\n", $1, $2)}' | xargs -L1 docker pull
@hetykai

This comment has been minimized.

Copy link

commented Mar 9, 2018

update images with tag latest

docker images --format "{{.Repository}}:{{.Tag}}" | grep :latest | xargs -L1 docker pull
@enoch85

This comment has been minimized.

Copy link

commented Apr 12, 2018

This doesn't seem to work anymore, any update? Btw please ping me with @enoch85

@RemeJuan

This comment has been minimized.

Copy link

commented May 26, 2018

@enoch85, I just used Brayden's command with success

@MarcAndre-Wessner

This comment has been minimized.

Copy link

commented Jun 10, 2018

To update the docker images with the current tag use this command:
docker images | grep -v REPOSITORY | awk '{printf $1; printf ":"; print $2}' | xargs -L1 docker pull

@bghost

This comment has been minimized.

Copy link

commented Jan 8, 2019

Update images with current tag @hetykai:

docker images --format "{{.Repository}}:{{.Tag}}" | xargs -L1 docker pull
@giggio

This comment has been minimized.

Copy link

commented Apr 30, 2019

I have been using this one:

docker images --format "{{.Repository}}:{{.Tag}}" | grep --invert-match '<none>' | xargs -L1 docker pull

It removes the untagged images and pulls all by tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.