buildpacks / pack

CLI for building apps using Cloud Native Buildpacks
https://buildpacks.io
Apache License 2.0
2.59k stars 289 forks source link

Failure to build with pack cli and finch #2254

Open doddatpivotal opened 2 months ago

doddatpivotal commented 2 months ago

Summary

I'm attempting to build a python container using the pack cli. I'm running on a macbook with M1 chip. I've installed pack cli via homebrew and running 0.35.1+git-3a22a7f.build-6099. When run pack build ... I get an error after the builder is pulled. The potentially unusual characteristic of my environment is that I'm using finch for my local docker development. I've added an alias: alias docker=finch.

I am able to pull and list the builder image with finch. But fail with pack.

I totally expect the issue is due to finch instead of running docker desktop for mac. I guess, I'm looking for advice on what information I could get from pack cli that would point me to a workaround or debug logs on how to properly shim these technologies together. finch is a hard requirement for me on my workstation.

Full Error Command:

pack build my-app --buildpack --paketo-buildpacks/python --builder gcr.io/buildpacks/builder:google-22                                                                 ─╯

gcr.io/buildpacks/builder:google-22:                                              resolved       |++++++++++++++++++++++++++++++++++++++| 
manifest-sha256:24d1064b4dd16aac65d6aebdda40e0d7d8481dd3e3aaed1aed52898a494cb729: exists         |++++++++++++++++++++++++++++++++++++++| 
elapsed: 1.3 s                                                                    total:   0.0 B (0.0 B/s)                                         
gcr.io/buildpacks/builder:google-22:                                              resolved       |++++++++++++++++++++++++++++++++++++++| 
manifest-sha256:24d1064b4dd16aac65d6aebdda40e0d7d8481dd3e3aaed1aed52898a494cb729: exists         |++++++++++++++++++++++++++++++++++++++| 
config-sha256:93650f3e1057d8f1f1e4798f6a2868c7a2e2937ba37cdd75edf0d1e3ef31a284:   done           |++++++++++++++++++++++++++++++++++++++| 
elapsed: 1.4 s                                                                    total:   0.0 B (0.0 B/s)                                         
Pulled gcr.io/buildpacks/builder:google-22
ERROR: failed to build: failed to fetch builder image 'gcr.io/buildpacks/builder:google-22': get history for image "gcr.io/buildpacks/builder:google-22": request returned Method Not Allowed for API route and version http://%2FApplications%2FFin

Environment

pack info
pack report                                                                                                                                                            ─╯
Pack:
  Version:  0.35.1+git-3a22a7f.build-6099
  OS/Arch:  darwin/arm64

Default Lifecycle Version:  0.20.0

Supported Platform APIs:  0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.10, 0.11, 0.12, 0.13

Config:
(no config file found at /Users/doddatpivotal/.pack/config.toml)
docker info
docker info                                                                                                                                                            ─╯
Client:
 Namespace:     finch
 Debug Mode:    false

Server:
 Server Version: v1.7.16
 Storage Driver: overlayfs
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Log: fluentd journald json-file syslog
  Storage: native overlayfs stargz
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.8.5-301.fc40.aarch64
 Operating System: Fedora Linux 40 (Cloud Edition)
 OSType: linux
 Architecture: aarch64
 CPUs: 2
 Total Memory: 3.804GiB
 Name: lima-finch
 ID: 15916178-f268-4182-90f2-ac8b2844fccf
jjbustamante commented 2 months ago

Hi @doddatpivotal

What happens if you try to use Paketo builders? form your command you are using google builder, but could you try with paketo?

jjbustamante commented 2 months ago

I am not sure if gcr.io/buildpacks/builder:google-22 is available for ARM architecture, that's one thing. That's why I suggest you use Paketo builders, because, Paketo team is working on publishing builders and buildpacks for ARM architecture.

Another thing you can do is try to build on a x86 machine, which will help you to see if the problem is just the lack of buildpacks binaries or if there is something else

natalieparellano commented 2 days ago

@doddatpivotal any further thoughts on this?