Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker pull - force download

Tags:

docker

Is there a possibility to force pull of docker image?

I have redeployed docker image to another repository, but when I invoke

docker pull anotherrepo:port/my/image

nothing gets downloaded, instead I get info:

Digest: sha256:somehash

and that image is up to date.

docker rm/rmi doesn't work because the image is downloaded from originalrepo:port/my/image and I don't want to stop/delete it onyl for test purposes.

Is there possible to force pull to check if the image is correctly pushed?

like image 776
9ilsdx 9rvj 0lo Avatar asked Jan 19 '18 09:01

9ilsdx 9rvj 0lo


People also ask

What is the command for downloading the image from Docker Hub?

To download a particular image, or set of images (i.e., a repository), use docker pull .


1 Answers

The following should work. You add a temporary tag to avoid deletion of the image, delete the original tag and then pull:

docker tag "$originalTag" "tmpTag"
docker rmi "$originalTag"
docker pull "$originalTag"
docker rmi "tmpTag"
like image 188
Maximilian Mordig Avatar answered Sep 25 '22 07:09

Maximilian Mordig