Replies: 2 comments 1 reply
-
Sounds like there's some desire to get this done. This would need to be updated to project descriptor 0.2 and make an RFC. I've created an issue (buildpacks/rfcs#164) to track this work. Open to contributions. :) |
Beta Was this translation helpful? Give feedback.
0 replies
-
@jromero I agree that runtime env vars in project.toml would be a useful feature. Why would we expose them in |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
As a developer, I'd like to be able to provide environment variables that would be used at runtime environment when executing a build.
Details
Currently,
pack
supports providing build environment variables as a method of configuring buildpacks. Runtime environment variables would enable scenarios where it would be prefered for environment variables to be stored within the container image. This would be analogous to the Dockerfile'sENV
instruction but scoped to only applying at runtime.Furthermore, it would be ideal if the provided environment variables could have "operations" as build-time env vars do now in certain contexts.
Functionality
End-User interactions
Some example extension points to provide this functionality to end-users are as follows:
project.toml
pack build
/platform/env.launch/
project.toml
pack build
NOTES:
/platform/env.launch/
contract below to provide configuration to the lifecycle.override
operations for all process types.project.toml
file./platform/env.launch/
Lifecycle implementation
Configuration
<platform>/env.launch/
but stored in some other format (possibly in the<layers>/env.launch/
directory).<platform>/env.launch/
and applied to the running environment.Order of precedence
This is a proposed order of precedence (higher takes precedence):
docker run --env
, podspec env vars)<platform>/env.launch/
(provided at runtime)<layers>/env.launch/
(persisted from build-time)<layers>/<layer>/env.launch/
(provided by buildpacks from build-time)Alternatives
Additional Thoughts
env
directories with Buildpack API contract<platform>/env
- environment variables for both runtime and build-time (currently this is defined as build-time only)<platform>/env
- remove use to prevent unintentionally leaking built-time only env vars<platform>/env.build
- build-time environment variables<platform>/env.launch
- runtime environment variables for all process types (this proposal)<platform>/env.launch/<process-type>/
- runtime environment variables for a specific process type (this proposal)References
Beta Was this translation helpful? Give feedback.
All reactions