feat: properly export env vars for cnb apps
They are not baked into the image like they are for herokuish, so we need to manually set them via --env. Additionally, due to newline constraints in docker, we need to use `--env=key` format to correctly pull the values into place.
This commit is contained in:
@@ -14,8 +14,8 @@ trigger-config-docker-args() {
|
||||
STDIN=$(cat)
|
||||
trigger="$0 config_docker_args"
|
||||
|
||||
if ! is_image_herokuish_based "$IMAGE" "$APP"; then
|
||||
ENV_ARGS="$(config_export app "$APP" --format docker-args --merged)"
|
||||
if ! is_image_herokuish_based "$IMAGE" "$APP" || is_image_cnb_based "$IMAGE"; then
|
||||
ENV_ARGS="$(config_export app "$APP" --format docker-args-keys --merged)"
|
||||
echo -n "$STDIN $ENV_ARGS"
|
||||
else
|
||||
echo -n "$STDIN"
|
||||
|
||||
@@ -222,6 +222,7 @@ fn-start-app-container() {
|
||||
|
||||
declare -a __DOKKU_DOCKER_ARG_ARRAY
|
||||
eval "__DOKKU_DOCKER_ARG_ARRAY=($DOCKER_ARGS)"
|
||||
eval "$(config_export app "$APP")"
|
||||
"$DOCKER_BIN" container create "${__DOKKU_DOCKER_ARG_ARRAY[@]}"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user