-
Notifications
You must be signed in to change notification settings - Fork 552
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
GitHub Action produces unknown architecture and OS #820
Comments
What version of Docker is running on the raspberry pi? You can get this information from The extra manifest is attached as part of the new |
Here's the output of
Doesn't seem that old to me, doesn't it :) |
Doesn't seem you're building for your platform in your workflow. Atm it builds a
Looks like you're missing the - name: Build and push Docker image for Raspberry Pi
id: docker_build
uses: docker/build-push-action@v4
with:
push: true
platforms: linux/amd64,linux/arm64
tags: |
mu88/thisisyourlife:latest
mu88/thisisyourlife:${{ github.ref_name }}
file: src/WebApp/Dockerfile More info: https://docs.docker.com/build/ci/github-actions/multi-platform/ |
Specifying the AFAIK specifying |
@crazy-max what would be the syntax for setting - name: Build and push Docker image for Raspberry Pi
id: docker_build
uses: docker/build-push-action@v4
with:
push: true
provenance: false
tags: |
mu88/thisisyourlife:latest
mu88/thisisyourlife:${{ github.ref_name }} |
Okay, using |
Got the same issue in my GitHub action on test repo, with minimal config: https://github.com/shanduur/template-ci-container/pkgs/container/template-ci-container/76745715?tag=v1.0.0-beta.1-alt |
@shanduur I set |
and fix a unknown architecture and OS bug, see docker/build-push-action#820 https://z.itpub.net/article/detail/0CDEB0CB6B793FD6B38611B9E15B6FA6
@crazy-max what's the future of this issue? I'd like to remove |
Just out of curiosity 🙂 could you elaborate a bit more on why a container registry that is not fully compatible with all Docker features is used? From a customer/developer perspective, that's a bit hard to understand, to be honest, but I'm pretty sure there are excellent reasons. |
The root cause to me seems to be with cross-compilation - building an image for platform A on platform B. Setting The fix for this is to use the docker build helpers for cross-compilation, and not rely on the assumption that machines of arch A will consume incorrect metadata for arch B. See the multi-platform guide for a more detailed introduction, but to summarize:
If you are building multi-platform images, you should make sure that
A few options:
This isn't true. GHCR supports images with both Docker media types and OCI media-types, like most registries today, including Docker Hub. When provenance is generated, the default from v4 of this action (and buildx v0.10), the built image is actually an OCI image, compared to previous versions where it was using Docker media-types. There is no additional out-of-spec metadata included by docker with provenance enabled, the images we generate are entirely in-spec with OCI. |
Cool, thank you very much for your in-depth explanation 💪🏻 setting |
@jedevc thanks for clarification! |
Without this change, a second package with arch "unknown/unknown" will be published to the package repository. See docker/build-push-action#820 for more information.
* Feat: multi-arch docker image - adapt Dockerfile to support cross-compilation depending on TARGETARCH and TARGETOS variables see https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/ - set target platforms for docker/build-push-action * Support running on forks * Fix ARG format * Fix docker digest step * Restrict permissions * Update action versions * Set $TARGETPLATFORM explicitly docker/build-push-action#820 (comment) --------- Co-authored-by: Norman Gehrsitz <[email protected]>
Known issue and resolution: docker/build-push-action#820
Known issue and resolution: docker/build-push-action#820
In the currently oci image relase github action page, there is a unknown/unknown manifest which is confused and useless. According to this PR docker/build-push-action#820, we could remove it.
In the currently oci image relase github action page, there is a unknown/unknown manifest which is confused and useless. According to this PR docker/build-push-action#820, we could remove it. Signed-off-by: kennylong <[email protected]>
Troubleshooting
Before submitting a bug report please read the Troubleshooting doc.
Behaviour
Steps to reproduce this issue
docker pull mu88/thisisyourlife:latest
Expected behaviour
The image can be pulled.
Actual behaviour
When running
hub-tool tag ls mu88/thisisyourlife --format json
on my Win11 machine, it shows this:I've already created this issue in a Docker forum. I first had the problem with this repo resp. the Docker image
mu88/shopandeat:latest
. Then I thought that I can resolve it by deleting all tags from the Docker Hub and building the image again, but now the problem is back for another repo and deleting the tags doesn't solve it.Since I cannot reproduce this issue when running the GitHub Action locally (via
act
) or simply viadocker build
, I assume it's a problem of this GitHub Action stepdocker/build-push-action@v4
.Configuration
Logs
The text was updated successfully, but these errors were encountered: