CenturyLinkLabs / golang-builder

Containerized build environment for compiling an executable Golang package and packaging it in a light-weight Docker container.
Apache License 2.0
398 stars 85 forks source link

Support passing in additional arguments to docker build #21

Open stuarthicks opened 8 years ago

stuarthicks commented 8 years ago

I have a project using golang-builder, and I'd like to reference environment variables in my Dockerfile using the ENV directive (docs). Unfortunately, it appears that this still requires the -e/--build-arg params on the call to docker build (docs).

Currently this does not appear to be possible with golang-builder, so I'd like to discuss on this issue possible ways to introduce this feature.

To start things off, how about an environment variable passed in called something like DOCKER_BUILD_ARGS that allows any arbitrary extra args to be given to the docker build command. That seems like it would be a generic-enough implementation. What do you think?