-
Notifications
You must be signed in to change notification settings - Fork 33
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
Adds stack descriptor RFC #169
Conversation
I can't see a reason not to do this. If anyone has one, I'd love to hear it. Any way we can make the stacks code more configurable and easier to use is a huge win in my eyes. I also feel like a well-defined configuration file demystifies some of the confusion around our stack creation. |
ce52616
to
723f8ad
Compare
|
||
## Rationale and Alternatives | ||
|
||
We could abandon the `create-stack` codebase entirely and expect that anyone |
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.
As someone with essentially no exposure to the stack creation, can you briefly describe the downside to the Dockerfile
approach? I can infer/assume but I'd like to hear your thoughts.
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.
The process documented on the CNB site doesn't seem too onerous. I'm curious what's missing from that process or what advantage there is to using this tool?
Conversely, I think it would be nice if our process aligned with the documented process from the CNB. I can see an advantage there.
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.
The biggest concern I have between the Dockerfile-only interface and what is proposed here is that we're co-mingling the parts that make up a "base image" (os-specific modifications to an image to make it a reasonable base to build on top of) and a "stack" (the parts of the image that are codified in the Buildpacks Platform Spec or in Paketo RFCs). The effort here is to try to separate those things so its a bit clearer where the line is.
Additionally, we have some features in the existing stacks that aren't part of the Buildpacks Platform Spec that are non-trivial to implement inline in a Dockerfile. Specifically, I am thinking of the code that generates our existing image label-based SBOM for run images. Ideally, I'd like to be able to move the existing stacks onto this new configuration format and tooling since we'll be maintaining them for the next year before they go out of support.
723f8ad
to
76b2433
Compare
text/stacks/0003-stack-descriptor.md
Outdated
name = "<os distro name>" # optional | ||
version = "os distro version>" # optional |
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.
Should we be using values (ID
and VERSION_ID
) in /etc/os-release
instead of user-provided values?
Or we could make these optional and fail if they do not match /etc/os-release
.
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.
It makes sense to just use what exists in /etc/os-release
. We can probably omit these labels otherwise since the labels themselves are not required by the spec. I added some details about this in the Stack Spec Requirements
section.
homepage = "<homepage uri>" # optional | ||
maintainer = "<maintainer name>" # optional | ||
|
||
platforms = ["linux/amd64", "linux/arm64", "<other-platform>"] # optional; default = ["linux/amd64"]; choices defined in https://docs.docker.com/desktop/multi-arch/ |
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.
Aren't the platform(s) are dictated by the platform(s) base image(s) from which we construct the stack?
Maybe we should:
- require that the dockerfile accept the base image as a build arg
- require that provide a reference to the base image in this file
- If the reference is a single image, inherit the platform
- If the reference is a multi-arch image, build multiple times times and create a multi-arch image from the result
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.
I outlined a bit how I expect the toolchain to handle multi-arch images. The outputs will basically always be formatted as an image index, but may only contain images for a single platform.
76b2433
to
28322a4
Compare
28322a4
to
db4ddfe
Compare
db4ddfe
to
73900b1
Compare
73900b1
to
58f3f23
Compare
Summary
Readable
Checklist