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

Specify envvars for docker driver #173

Closed
apognu opened this issue Sep 30, 2015 · 8 comments
Closed

Specify envvars for docker driver #173

apognu opened this issue Sep 30, 2015 · 8 comments

Comments

@apognu
Copy link
Contributor

apognu commented Sep 30, 2015

Is there any way to specify environment variables to be sent with the creation of a Docker container? According to the doc, it's not.

I know I can add items to the meta specification directive, and it will, as a result, add envvar to my running container, unfortunately those are prefixed with NOMAD_META_, and developing my application to use those does not seem very agnostic.

Any plans to add an option to specify those?

Regards,

@dimfeld
Copy link
Contributor

dimfeld commented Sep 30, 2015

If you need this right away, a quick-and-dirty solution would be to change SetMeta in /client/driver/environment/vars.go to not add the prefix. That said, official support for this would be great.

@dimfeld
Copy link
Contributor

dimfeld commented Sep 30, 2015

@hashicorp-team Not sure if this is on your roadmap but I'd be glad to work on it in my free time over the next few weeks and submit a PR. Seems like it's just a matter of adding another map to the Task structure (named env or environment, perhaps?) and associated code for parsing from HCL and applying the settings. Any thoughts?

@apognu
Copy link
Contributor Author

apognu commented Sep 30, 2015

I was starting to read the code to do exactly that myself.

@dimfeld
Copy link
Contributor

dimfeld commented Sep 30, 2015

Feel free to take it on if you'd like, but either way is fine with me so long as we don't do duplicate work :)

@apognu
Copy link
Contributor Author

apognu commented Sep 30, 2015

Yeah, almost got something ready to PR, should be ready tonight or tomorrow morning.

@dimfeld
Copy link
Contributor

dimfeld commented Sep 30, 2015

👍 Cool, sounds great!

@ghost
Copy link

ghost commented Oct 1, 2015

+1 This is critical for pretty much any 12 factor app

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants