Skip to content
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 pull failed to unpack image using ko build on ARM #1218

Closed
vkuznet opened this issue Jan 23, 2024 · 1 comment
Closed

Docker pull failed to unpack image using ko build on ARM #1218

vkuznet opened this issue Jan 23, 2024 · 1 comment

Comments

@vkuznet
Copy link

vkuznet commented Jan 23, 2024

Hi,
I do not know if it is appropriate forum to discuss my issue, but since I built my image using gorelease and ko.build I would like to start somewhere. Here is the problem:

  • I use gorelease to build my software stack
  • For images I used the following ko.build section:
# https://ko.build/
kos:
  - repository: ghcr.io/xxx/yyy
    tags:
      - '{{.Tag}}'
      - '{{ if not .Prerelease }}latest{{ end }}'
    bare: true
    preserve_import_paths: false
    sbom: none
    platforms:
      - all
    flags:
      - -trimpath
    ldflags:
      - -s -w
  • then I upload image to github ghcr.io repo
  • finally, when I try to install it I get the following error message:
failed to unpack image on snapshotter stargz: mismatched image rootfs and manifest layers

Please note:

  • I use macOS with ARM chip to build code and build images
  • I use macOS Docker Desktop to provide me docker tool
  • I build code for all architectures using gorelease with the following build section
builds:
  - env:
      - CGO_ENABLED=0
    goos:
      - linux
      - windows
      - darwin
    binary: srv
    flags:
      - -trimpath
    ldflags:
      - -s -w
    goarch:
      - amd64
      - arm64
  • I'm in process of finding Linux box with recent docker which I can use to verify if this issue is related to ARM or not. My images are signed with SLSA github generator. Everything is automated with GitHub Action.
  • the github action build details can be found here, i.e. you can pick up any successful build to see the data-flow and expand it accordingly to a specific step.

Any feedback would be appreciated. If it is not appropriate forum I apologize for posting but I would appreciate any pointers how to debug this problem. The GitHub action does not reveal many internal details of the build and pulling image fails that I can't inspect it.

Thanks.

Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Keep fresh with the 'lifecycle/frozen' label.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant