feat: export environment variables during dockerfile builds for use with value-less --build-arg flags
Exposing all config values will allow users to skip setting environment variables twice - once as a docker option and once as an env var. Docker will automatically pull the value from the environment if none is set for the --build-arg flag. Users will still be required to specify each desired env var via --build-arg as otherwise docker builds will complain about unused build arguments. Re-implements #5978 (lost in a rebase) Closes #5903
This commit is contained in:
@@ -38,6 +38,7 @@ trigger-builder-dockerfile-builder-build() {
|
||||
declare -a ARG_ARRAY
|
||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||
|
||||
eval "$(config_export app "$APP")"
|
||||
"$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS "${ARG_ARRAY[@]}" ${DOKKU_DOCKER_BUILD_OPTS} -t $IMAGE .
|
||||
|
||||
plugn trigger post-build-dockerfile "$APP"
|
||||
|
||||
Reference in New Issue
Block a user