-
Notifications
You must be signed in to change notification settings - Fork 278
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
Add architecture for images created withpack buildpack package
#2080
Conversation
Signed-off-by: Jerico Pena <jericop@gmail.com>
f84b5b0
to
1900afe
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2080 +/- ##
==========================================
+ Coverage 78.96% 79.70% +0.75%
==========================================
Files 176 176
Lines 13246 13261 +15
==========================================
+ Hits 10459 10569 +110
+ Misses 2119 2023 -96
- Partials 668 669 +1
Flags with carried forward coverage won't be shown. Click here to find out more. |
pack buildpack package
pack buildpack package
OS string `toml:"os"` | ||
OS string `toml:"os"` | ||
Architecture string `toml:"architecture"` | ||
Platform string `toml:"platform,omitempty" json:"platform,omitempty" yaml:"platform,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit weird - why is Platform a field on Platform?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Platform struct is used by the package.toml
, as part of the multi-arch RFC, we are suggesting deprecating this field and adding a set of Targets.
Maybe we can add a single Target
as part of this PR? here is what I did on the multi-arch PoC.
@jericop what about getting the information you need from there for buildpack packages and extensions?
This issue is related to the following comment in the multi-arch RFC |
This would resolve the missing arch metadata we're seeing in our (new) multi-arch buildpack images, eg: |
Closing this PR, because we decided to include the implementation of the RFC 0128 with See my comment |
Summary
This changes the behavior of
pack buildpack package
to include the platform architecture when the docker daemon is available, or fromruntime.GOARCH
otherwise. It also has support for user-supplied architecture, but this is currently not supported through any pack cli arguments.Output
Before
The current behavior is described in #2079
After
You can verify the change in this PR by following the steps below.
Note that docker needs to be configured to build multi-arch images for this to work as described here.
Steps
docker buildx
command to create and publish buildpacks to ttl.sh, an ephemeral registry.Documentation
It is generally expected that when you build an image on a certain platform and architecture, the image you produce should be meant to run on that platform and architecture. As a result I don't believe this change needs to be documented.
Related
Resolves #2079
It should also resolve #1968, which was fixed by retry logic.