-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retagging and pushing a multiarch manifest #1744
Comments
Yup, this functionality exists today, you can use Unfortunately, only a single architecture image can be pulled locally, though there is ongoing work to improve that. |
What worked for me was:
My original image was published using
That published a new Obs: I have not added those two last manifests with annotations, maybe I need to, but I ran a test without them and it worked. Hope that helps you. |
hi Guys |
This was helpful, thank you! |
We managed to solve this with the following command:
This will copy |
very helpful, thank you guys 🥳 |
@thomaseizinger Does this work if both the registries are private for multi arch images? |
@elamaran11 Assuming you've authenticated to them, yes it should. Or at least it is for us. |
@jamilbk The moment we log in to second ECR, we are getting errors. |
… git tag Problem ------- The way we did docker images previously had two problems: 1. We pushed release versions (e.g. r1.39 or r2.01) on each commit, when these were basically unused and served to confuse users. 2. Because they were unused, we never detected that these were images (AMD64 or AARCH64) rather than manifests (which combine the two into a single package). They should be manifests. Solution -------- 1. Remove all releasee tagging from `docker-create` stage 2. Add a new stage `docker-tag` which only runs when you do a git tag. This runs a command found in docker/buildx#1744 (comment) to add a new manifest with a tag. PS: I looked to see if there was a way in Gitlab runner to only run a job with a git tag on the master repository. There are several hints at https://gitlab.com/gitlab-org/gitlab/-/issues/34578 (and elsewhere) but I didn't feel it worth spending the time to experiment. I did a good amount of testing detailed below: Before ------ Untagged pipeline (https://gitlab.com/YottaDB/DB/YDB/-/jobs/6513444579, https://gitlab.com/YottaDB/DB/YDB/-/jobs/6513444584, https://gitlab.com/YottaDB/DB/YDB/-/jobs/6513444588) Images: - docker.io/yottadb/yottadb-rocky:latest-master-aarch64 - docker.io/yottadb/yottadb-rocky:r2.01 << wrong - docker.io/yottadb/yottadb-rocky-base:latest-master-aarch64 - docker.io/yottadb/yottadb-rocky-base:r2.01 << wrong Manifests: - docker.io/yottadb/yottadb-rocky:latest-master - docker.io/yottadb/yottadb-rocky-base:latest-master-aarch64 Git Tagged pipeline (https://gitlab.com/YottaDB/DB/YDB/-/jobs/6518728035, https://gitlab.com/YottaDB/DB/YDB/-/jobs/6518728171, https://gitlab.com/YottaDB/DB/YDB/-/jobs/6519087415) Images: - docker.io/yottadb/yottadb-rocky:latest-amd64 - docker.io/yottadb/yottadb-rocky:r2.00 << wrong: not a manifest - docker.io/yottadb/yottadb-rocky-base:latest-amd64 - docker.io/yottadb/yottadb-rocky-base:r2.00 << wrong: not a manifest Manifests: - docker.io/yottadb/yottadb-rocky:latest - docker.io/yottadb/yottadb-rocky-base:latest After ----- Note: tested on my dockerhub namespace `samindcon`. Untagged pipeline (https://gitlab.com/shabiel/YDB/-/jobs/6519579293, https://gitlab.com/shabiel/YDB/-/jobs/6519579301, https://gitlab.com/shabiel/YDB/-/jobs/6519579310) Images: - docker.io/samindcon/yottadb-rocky:latest-master-amd64 - docker.io/samindcon/yottadb-rocky-base:latest-master-amd64 - docker.io/samindcon/yottadb-rocky:latest-master-aarch64 - docker.io/samindcon/yottadb-rocky-base:latest-master-aarch64 Manifests: - docker.io/samindcon/yottadb-rocky:latest-master - docker.io/samindcon/yottadb-rocky-base:latest-master Tagged pipeline (https://gitlab.com/shabiel/YDB/-/jobs/6526290702, https://gitlab.com/shabiel/YDB/-/jobs/6526290713, https://gitlab.com/shabiel/YDB/-/jobs/6534121532, https://gitlab.com/shabiel/YDB/-/jobs/6534121540) Images: - docker.io/samindcon/yottadb-rocky:latest-amd64 - docker.io/samindcon/yottadb-rocky-base:latest-amd64 - docker.io/samindcon/yottadb-rocky:latest-aarch64 - docker.io/samindcon/yottadb-rocky-base:latest-aarch64 Manifests: - docker.io/samindcon/yottadb-rocky:latest - docker.io/samindcon/yottadb-rocky-base:latest - docker.io/samindcon/yottadb-rocky:r2.01
Scenario:
Wouldn't it be better, if we can pull the manifest, have a way to tag it and push the same directly. Or is there any way that exists?
Thank you!
The text was updated successfully, but these errors were encountered: