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

Support for --build-arg in build-image #48

Closed
devonkinghorn opened this issue May 9, 2019 · 3 comments · Fixed by #49
Closed

Support for --build-arg in build-image #48

devonkinghorn opened this issue May 9, 2019 · 3 comments · Fixed by #49

Comments

@devonkinghorn
Copy link
Contributor

It would be nice to be able to pass in aws environment variables generated by aws-vault to build-image without the credentials being stored in the image.

https://docs.docker.com/engine/reference/commandline/build/

@devonkinghorn
Copy link
Contributor Author

Or it would be nice to be able to pass in arbitrary flags.
i.e.

[image]
--build-arg=AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
--build-arg=AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
--anotherarg=value

@rappdw
Copy link
Member

rappdw commented May 30, 2019

@devonkinghorn aren't the credentials generated by aws-vault ephemeral? If so, we don't want them to be build into the image...

rappdw added a commit that referenced this issue May 30, 2019
@rappdw
Copy link
Member

rappdw commented May 30, 2019

In any case docker-utils now supports "build-args" (for build-image) and "args" (for run-image) section under the image

so:

[image]
build_args=--build-arg=AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID --build-arg=AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
args=--cap-add SYS_PTRACE 

@rappdw rappdw mentioned this issue May 30, 2019
mikekwright pushed a commit that referenced this issue May 31, 2019
* add general arg support

* fixes #48 - Add build-args support

* Address issue caught in PR review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants