-
Notifications
You must be signed in to change notification settings - Fork 164
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 Build time and runtime images content to the Platform docs #770
base: main
Are you sure you want to change the base?
Adds Build time and runtime images content to the Platform docs #770
Conversation
hyounes4560
commented
Sep 28, 2024
- adds build and run images content under the platform section
Signed-off-by: Hanan Younes <[email protected]>
Signed-off-by: Hanan Younes <[email protected]>
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.
Mostly questions about terminology.
|
||
<!--more--> | ||
|
||
Each buildpack checks the source code and provides any relevant dependencies. Then, a `base image` is then generated from the application’s source code and these dependencies. |
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.
Is "base image" the correct term here? We've used "application image" in the past to refer to the final output image.
* The image config's `User` field is set to a non-root user with a writable home directory | ||
* The image config's `Env` field has the environment variable `CNB_USER_ID` set to the user [UID/SID](https://github.com/buildpacks/spec/blob/main/README.md#operating-system-conventions) of the user specified in the `User` field |
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.
We may have to explain what is meant by "User
field" and "Env
field". Do we mean user and environment here? i.e. that the build image must have a non-root user and CNB_USER_ID
is an environment variable which contains the uid
of that user.
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.
In general, I think we should avoid copy/pasting the spec into the docs. Then we just have two things to maintain. This section should provide some grounding for understanding the spec, and then link to it. Let's think about how to frame this and then provide a code suggestion.
|
||
The platform must ensure that: | ||
|
||
* The image config's `Env` field has the environment variable `PATH` set to a valid set of paths or explicitly set to empty (`PATH=`) |
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.
Again, I wonder if "Env
field" is the correct term here. Do we mean that the run image must define a PATH
environment variable?
|
||
#### Anatomy of a run image | ||
|
||
A `runtime` image may contain: |
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.
What's the difference between the "run image" and a "runtime" image?
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 think nothing... I think we decided to use "runtime base image" as opposed to "run image" because the latter was more of a CNB construct whereas the former would be recognized more widely.
@@ -0,0 +1,94 @@ | |||
+++ | |||
title="Base image types" |
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.
nit: can we name this file base-images.md? I think that would make more sense
weight=99 | ||
+++ | ||
|
||
As you already know, `Cloud Native Buildpacks (CNBs)` transform your application source code into `OCI images` that can run on any cloud and include all of the components your application needs to build and run and. |
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 you already know, `Cloud Native Buildpacks (CNBs)` transform your application source code into `OCI images` that can run on any cloud and include all of the components your application needs to build and run and. | |
As you already know, `Cloud Native Buildpacks (CNBs)` transform your application source code into `OCI images` that can run on any cloud. |
|
||
<!--more--> | ||
|
||
Each buildpack checks the source code and provides any relevant dependencies. Then, a `base image` is then generated from the application’s source code and these dependencies. |
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.
Each buildpack checks the source code and provides any relevant dependencies. Then, a `base image` is then generated from the application’s source code and these dependencies. | |
Each buildpack checks the source code and provides any relevant dependencies in the form of layers. Then, buildpack-provided layers are placed atop a runtime `base image` to form the final application image. |
|
||
### Build image | ||
|
||
A `build image` is an `OCI image` that serves as the base image for the `build` environment in which buildpacks `lifecycle` is executed. |
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.
A `build image` is an `OCI image` that serves as the base image for the `build` environment in which buildpacks `lifecycle` is executed. | |
A `build image` is an `OCI image` that serves as the base image for the `build` environment in which the CNB `lifecycle` and buildpacks are executed. |
|
||
#### Anatomy of a run image | ||
|
||
A `runtime` image may contain: |
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 think nothing... I think we decided to use "runtime base image" as opposed to "run image" because the latter was more of a CNB construct whereas the former would be recognized more widely.
* The image config's `User` field is set to a non-root user with a writable home directory | ||
* The image config's `Env` field has the environment variable `CNB_USER_ID` set to the user [UID/SID](https://github.com/buildpacks/spec/blob/main/README.md#operating-system-conventions) of the user specified in the `User` field |
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.
In general, I think we should avoid copy/pasting the spec into the docs. Then we just have two things to maintain. This section should provide some grounding for understanding the spec, and then link to it. Let's think about how to frame this and then provide a code suggestion.