-
Notifications
You must be signed in to change notification settings - Fork 33
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
bug(digests): Multible Tags get pushed with diferent SHA digests #26
Comments
This looks suspiciously like containers/podman#6496 |
Interesting, I will try and give Quay a try to see if I can replicate this there too (which I should not be able too if your test workflow is anything to go by). I will report back as soon as I have the results. EDIT: This comment in the linked Issue seems interesting |
In the main branch, I've put in a commit which logs the digest after each push instead of at the end. So we can detect this one step earlier. This confirms again that at least in our test workflow, the digests match. https://github.com/redhat-actions/push-to-registry/runs/1943110175?check_suite_focus=true |
Well I just changed the target registry to |
the only difference I can see between our workflows is that I am using a "Containerfile" (aka. Dockerfile) to build the Image, while you seem to build from source |
I'll install skopeo, just to see if I can see the same difference between the 2 tags as described in this comment |
okay well this is interesting. Output
{
"Name": "quay.io/k3rnel-pan1c/dockerhub_ratelimit_exporter",
"Digest": "sha256:46fcdc9e5ce82ed4b4b3496075fbf25d6b29adc8839ddff5013757113ed44dc9",
"RepoTags": [
"unstable",
"20f9b0c02c10738bae1af9ec73ad448eec1ef6df"
],
"Created": "2021-02-20T19:42:35.949902314Z",
"DockerVersion": "",
"Labels": {
"description": "A exporter for prometheus to check the pull limit of the DockerHub",
"io.buildah.version": "1.19.2",
"name": "dockerhub_ratelimit_exporter",
"url": "https://github.com/dohq/dockerhub_ratelimit_exporter",
"version": "1.1.0"
},
"Architecture": "amd64",
"Os": "linux",
"Layers": [
"sha256:56d2cc464a85a998ee278fe62d1cfe82a5c6da1ae9b60ca35362d36defcd458a",
"sha256:e116040e706ed480eb26cfb6709d460356f61227129835125ac12666e8c70b9a"
],
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
]
}
Output
{
"Name": "quay.io/k3rnel-pan1c/dockerhub_ratelimit_exporter",
"Tag": "20f9b0c02c10738bae1af9ec73ad448eec1ef6df",
"Digest": "sha256:55a559bee5ebf72faf691fe66ec08e0eb663043bc8322b652deef07e84aaef20",
"RepoTags": [
"unstable",
"20f9b0c02c10738bae1af9ec73ad448eec1ef6df"
],
"Created": "2021-02-20T19:42:35.949902314Z",
"DockerVersion": "",
"Labels": {
"description": "A exporter for prometheus to check the pull limit of the DockerHub",
"io.buildah.version": "1.19.2",
"name": "dockerhub_ratelimit_exporter",
"url": "https://github.com/dohq/dockerhub_ratelimit_exporter",
"version": "1.1.0"
},
"Architecture": "amd64",
"Os": "linux",
"Layers": [
"sha256:56d2cc464a85a998ee278fe62d1cfe82a5c6da1ae9b60ca35362d36defcd458a",
"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4",
"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4",
"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4",
"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4",
"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4",
"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4",
"sha256:e116040e706ed480eb26cfb6709d460356f61227129835125ac12666e8c70b9a"
],
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
]
} edit: |
I tried a dockerfile build, and also added a LABEL to my dockerfile because I noticed yours had some and mine didn't. workflow Still, the SHAs match - and I used dockerhub, too. I will try to dive deeper tomorrow... |
hey @k3rnelpan1c-dev - I cloned your repo and went through the following steps here
So, this is indeed containers/image#733 which appears to have been fixed in podman 3.0.0. You should be able to fix this for yourself by updating your workflow to use |
Hi @tetchel. first of all THANK YOU for this detailed analysis and solution 👍 Regardless, this should maybe be noted in the readme until GitHub / Microsoft have exchanged the image behind Thank you for all the work and very quick resolution 🎉 |
@k3rnelpan1c-dev / @tetchel |
Description
Pushing an image with more than one tag seems to result in the same image pushed with a different digest per pushed tag.
To reproduce
buildah-build
andpush-to-registry
actiontags: unstable {{ github.sha }}
)Example
I stumbled over this while working on some PRs for
dohq/dockerhub_ratelimit_exporter
where I wanted to add an incremental build workflow and ultimately release workflow pushing a Container Image.I tried pushing to both the new
ghcr.io
(tried formats: docker and oci) as well asdocker.io
(tried format: docker), both resulting in the image getting pushed successfully, but with 2 different digests for the two tags.my Fork's
inc-build
Workflowthe result on
ghcr.io
The "2" tags in the screenshot are the result of the same inc-build => the same image.
Alternative "solution"
Use the docker based alternative actions to build and push, as these don't seem to face this problem☹️
The text was updated successfully, but these errors were encountered: