draft-classic icon indicating copy to clipboard operation
draft-classic copied to clipboard

image-build-args doesn't support pass-through envvar propagation

Open omnilinguist opened this issue 7 years ago • 1 comments

in #772, image-build-args was implemented, but the way it is implemented it wasn't clear how to make it work for pass-through envvars. to better explain this, in docker-compose's environment:, one can do either - BUILD_TIME_ARG=build-time-argument-value or simply just - BUILD_TIME_ARG, with the idea that it would be filled in from $BUILD_TIME_ARG from the environment where docker-compose is being called.

as discussed with @bacongobbler, this doesn't seem to be working for filling the envvars from where draft up is being called, thus resulting in a regression from docker-compose.

if draft.toml supported envvar injection, it may be possible to do something like image-build-args = { BUILD_TIME_ARG = "$BUILD_TIME_ARG", HTTP_PROXY = "$HTTP_PROXY" } as a workaround, but this is an implementation detail that is probably better left to the draft project owners to sort out.

omnilinguist avatar Jun 01 '18 15:06 omnilinguist

Also related to this would be the inclusion of support for loading said env vars from a .env file

Sykomaniac avatar Jul 30 '18 10:07 Sykomaniac