Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker pull image using several tags

I have an image in AWS ECR with several tags. For example:

image name: myapp

tags: 1.0.1 , staging , latest

Now I want to pull this docker image using the version number tag + environment tag.

I already have tried:

docker pull 123456789.dkr.ecr.us-west-100.amazonaws.com/myapp:1.0.1:staging

but I get the error:

invalid reference format

Do you know if this is possible somehow?

Remark: using only 1 tag it's working. For example: myapp:1.0.1

like image 251
dsaydon Avatar asked Aug 10 '26 02:08

dsaydon


1 Answers

after docker docs

--all-tags, -a false Download all tagged images in the repository

so you can actually do following to get ALL tags:

docker pull --all-tags 123456789.dkr.ecr.us-west-100.amazonaws.com/myapp

If you do require just some tags it's sadly impossible at the moment, but for that you can just put it inside of a script or && it or whatever else you like.

like image 199
user3012759 Avatar answered Aug 12 '26 23:08

user3012759



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!