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

Buildpacks build fails on Apple M1: no matching manifest for linux/arm64/v8 #5971

Closed
briandealwis opened this issue Jun 8, 2021 · 1 comment · Fixed by #6284
Closed

Buildpacks build fails on Apple M1: no matching manifest for linux/arm64/v8 #5971

briandealwis opened this issue Jun 8, 2021 · 1 comment · Fixed by #6284
Labels
area/build build/buildpacks kind/friction Issues causing user pain that do not have a workaround meta/examples

Comments

@briandealwis
Copy link
Member

Our buildpacks examples fail when building from an Apple M1:

fetching lifecycle image: no matching manifest for linux/arm64/v8 in the manifest list entries

This error happens as Skaffold does not maintain a list of trusted builders, and so all builders are marked as untrusted. With an untrusted builder, the pack library will not use the builder's embedded lifecycle binary and instead attempts to run the lifecycle from a separate image. But recent lifecycle images (e.g., buildpacksio/lifecycle:0.11.1) point to a manifest list with images for linux/amd64 and windows/amd64, and so the fetch fails. This has been filed upstream as buildpacks/pack#1197.

An easy workaround is for the user to indicate in their skaffold.yaml that the builder is trusted so that the pack library will use the lifecycle from within the builder image:

--- skaffold.yaml
+++ skaffold.yaml
@@ -5,6 +5,7 @@ build:
   - image: skaffold-buildpacks
     buildpacks:
       builder: "gcr.io/buildpacks/builder:v1"
+      trustBuilder: true
       env:
       - GOPROXY={{.GOPROXY}}
 profiles:

The best fix for the moment is for Skaffold to indicate that the GCP Buildpacks builder is trusted by default.

The CNB lifecycle team is lifecycle image is also available for linux/arm64 (buildpacks/lifecycle#435), which is non-trivial.

Expected behavior

The following should succeed:

$ cd examples/buildpacks
$ cat skaffold.yaml
[...]
build:
  artifacts:
  - image: skaffold-buildpacks
    buildpacks:
      builder: "gcr.io/buildpacks/builder:v1"
      env:
      - GOPROXY={{.GOPROXY}}
[...]
$ skaffold build

Actual behavior

$ skaffold build
Generating tags...
 - skaffold-buildpacks -> skaffold-buildpacks:v1.25.0-30-g3eb517587
Checking cache...
 - skaffold-buildpacks: Not found. Building
Starting build...
Found [minikube] context, using local docker daemon.
Building [skaffold-buildpacks]...
v1: Pulling from buildpacks/builder
Digest: sha256:5f109c6becf6ecd70d7201de44775f21902e1b027ee68eb982bd55787eb25165
Status: Image is up to date for gcr.io/buildpacks/builder:v1
v1: Pulling from buildpacks/gcp/run
Digest: sha256:13535b83b3cfb66571907c574bca1cc1852ac6cf5b3096d3e654cd2d95bbecd6
Status: Image is up to date for gcr.io/buildpacks/gcp/run:v1
0.11.1: Pulling from buildpacksio/lifecycle
fetching lifecycle image: no matching manifest for linux/arm64/v8 in the manifest list entries

Information

  • Skaffold version:
  • Operating system:
  • Installed via:
  • Contents of skaffold.yaml:
<paste your skaffold.yaml here>

Steps to reproduce the behavior

  1. a clonable repository with the sample skaffold project
  2. skaffold <command>
  3. ...
@briandealwis
Copy link
Member Author

This trustBuilder: is no longer necessary now that the CNB project provides a linux/arm64 image for the lifecycle. But keeping it doesn't hurt as it causes the build to use the lifecycle binary packaged into the builder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build build/buildpacks kind/friction Issues causing user pain that do not have a workaround meta/examples
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant