-
Notifications
You must be signed in to change notification settings - Fork 559
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
Docker push creates multiple images on GCR, some with creation timestamp equal to 0 epoch #771
Comments
I am also seeing 3 images built and pushed, expecting one |
It is the GCR web UI that is interpreting the OCI image incorrectly and showing it as 3 separate images. See docker/buildx#1533 for details. |
Despite the fact that I have |
Is there a way around it for the moment? |
Per the link to this issue this worked for me:
|
@pantelis-karamolegkos Do you have logs to show for that build that uses |
Yes, here they are
|
@tonistiigi I assume I could switch to the |
@pantelis-karamolegkos The logs. https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/using-workflow-run-logs#downloading-logs The config in your other issue is not correct. You might be looking for |
@pantelis-karamolegkos could you share the full logs of your github ci run? If there's something confidential in there, then feel free to just include the buildx command invoked, and the final push part of the log: e.g.:
|
My setup is the following
- name: build and push to local registry
uses: docker/[email protected]
with:
context: ${{ inputs.context }}
file: ${{ inputs.context }}/${{ inputs.dockerfile }}
no-cache: ${{ inputs.no_cache }}
build-args: ${{ inputs.build_args }}
push: true
tags: ${{ env.LOCAL_IMAGE }}
builder: ${{ steps.setup-buildx.outputs.name }}
provenance: false copy image to gcr - name: copy tagged image to gcr
if: inputs.image_build == true
shell: bash
run: |
docker buildx imagetools create \
--tag "${{ steps.set-images.outputs.sre_base }}:${{ inputs.image_tag }}" \
${{ env.LOCAL_IMAGE }} Trying to be a little cautious for the moment and avoiding pasting full log output, not in a position to sanitise them |
@pantelis-karamolegkos Output of |
Provenance is disabled - there's no messages about it in the log output that would definitely appear if provenance was enabled. Your logs indicate that you're pushing a single manifest - I'm not sure why you're seeing the weird result in GCR. Could one of them be the result of a previous run? Could you try with a different tag, to ensure they're separate? If still the same, could you share the contents in the |
Let me delete both ghost images, use another tag and re-run the experiment. I will then share the manifest contents |
btw I noticed (FWIF) that no matter the action version used, buildkit is always
|
Yes. This is intentional. If you want to pin the buildkit version, you can use the |
Same result Manifest of the first image in the list (the one tagged {
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
"schemaVersion": 2,
"manifests": [
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"digest": "sha256:29de78dbd7dfdb97af5ee4a0e840e91e9337a9e74ec45c00c8c4c53fd35ba3f5",
"size": 696,
"platform": {
"architecture": "amd64",
"os": "linux"
}
}
]
} Manifest of the 2nd image {
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"schemaVersion": 2,
"config": {
"mediaType": "application/vnd.docker.container.image.v1+json",
"digest": "sha256:f623c026bf51ce59c501d428786e33290f80477c63259cb114b8d8326035d67b",
"size": 1082
},
"layers": [
{
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
"digest": "sha256:8921db27df2831fa6eaa85321205a2470c669b855f3ec95d5a3c2b46de0442c9",
"size": 3370628
},
{
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
"digest": "sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1",
"size": 32
}
]
} |
Here comes the coolest part...Whenever I delete these 2 images, a 3rd one appears (!!!) Manifest {
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"schemaVersion": 2,
"config": {
"mediaType": "application/vnd.docker.container.image.v1+json",
"digest": "sha256:f623c026bf51ce59c501d428786e33290f80477c63259cb114b8d8326035d67b",
"size": 1082
},
"layers": [
{
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
"digest": "sha256:8921db27df2831fa6eaa85321205a2470c669b855f3ec95d5a3c2b46de0442c9",
"size": 3370628
},
{
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
"digest": "sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1",
"size": 32
}
]
} |
Everything started about a week ago. |
@jedevc I tried to change the
but still...
does this make sense? |
to pin the buildkit version you need:
|
Out of curiosity, does your |
No, I have the simplest FROM alpine:latest
RUN ls -al |
I got the same issue using the v3 of that action (images of size 0 and off timestamp, etc). Using |
Same behaviour on AWS ECR (untagged image with size 0) with v3.3.0 release. Using |
Ideally this feature would have better been implemented in v4 or defaulted to false. Related to #778. Would it be prudent to release a new sub version (ie: 3.4) with it defaulted to false? It would save a lot of headache for others. |
The change is not introduced in docker/build-push-action, the breaking change is actually introduced in buildx. build-push-action only invokes buildx, using the defaults provided from that. You can pin buildx to a desired version, if you're concerned about breakage in-between versions. See the docs in the README for more information about how to do that. Producing a new sub version that changes the default is not something that can be done in build-push-action - and it's not a likely change to happen in buildx either - breakage in the registry is a registry issue, not a builder issue. |
After using |
Oh right if you're still using And as
|
Set provenance: false because docker/build-push-action#771
In which version is this supposed to be fixed? I still have the issue with docker/[email protected] and docker/setup-buildx-action@v3 |
Still an issue at |
The same for me. If the problem is not fixed, why is the issue closed? Should a new one be opened? |
Someone wrote above that the issue is in buildx and registry but using provenance: false resolved issue for others, I didn't try it yet but I will. |
Thank you, missed that. In case anyone is waiting here. It seems to be solved with the current version. |
Troubleshooting
Before submitting a bug report please read the Troubleshooting doc.
Behaviour
Steps to reproduce this issue
Build an image and push to local registry
Use
buildx
to copy the image to a GCR registryExpected behaviour
One image should be created
Actual behaviour
Instead, I am seeing this weird behaviour
Configuration
My workflow uses the local registry service
FWIW
# paste your YAML workflow file here and remove sensitive data
Logs
The text was updated successfully, but these errors were encountered: