Skip to content
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

Fix dockerrun.sh to dynamically add CLI build environment variables to the container #7486

Open
eerhardt opened this issue Jan 11, 2017 · 1 comment
Labels
Milestone

Comments

@eerhardt
Copy link
Member

The current way we pass environment variables to our docker containers leads to errors and duplication. See https://github.com/dotnet/cli/blob/rel/1.0.0/scripts/dockerrun.sh#L115-L134 where we need to keep updating the environment variables that are passed in. For example, dotnet/cli#5274.

Instead, we should make this dynamic so we don't have to keep this list up to date.

One idea I had was to use printenv to get the list of environment variables. Grab all the ones that start with a prefix like CLIBUILD_, and write them out to an env-file. Then pass that file to docker run --env-file. See https://docs.docker.com/engine/reference/commandline/run/#/set-environment-variables--e---env---env-file.

@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
@msftgits msftgits added this to the Backlog milestone Jan 31, 2020
Copy link
Contributor

Due to lack of recent activity, this issue has been labeled as 'stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label.

@github-actions github-actions bot added the stale label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants