kas-docker: Propagate only supported SHELL settings
Other values will cause the container to fail because the shell binary is missing. This avoids non-obvious failures when the host SHELL is configured differently. Reported-by: Phillipp von Rotenhan <phillipp.von_rotenhan.ext@siemens.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
97942197bc
commit
1988cdd26b
@ -217,13 +217,20 @@ fi
|
||||
|
||||
set -- ${DOCKER_ARGS}
|
||||
|
||||
for var in SHELL TERM KAS_DISTRO KAS_MACHINE KAS_TARGET KAS_TASK \
|
||||
for var in TERM KAS_DISTRO KAS_MACHINE KAS_TARGET KAS_TASK \
|
||||
KAS_PREMIRRORS; do
|
||||
if [ -n "$(eval echo \$${var})" ]; then
|
||||
set -- "$@" -e "${var}='$(eval echo \"\$${var}\")'"
|
||||
fi
|
||||
done
|
||||
|
||||
# propagate only supported SHELL settings
|
||||
case "$SHELL" in
|
||||
/bin/sh|/bin/bash|/bin/dash)
|
||||
set -- "$@" -e "SHELL='$(eval echo \"\$SHELL\")'"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "${NO_PROXY_FROM_ENV+x}" ]; then
|
||||
for var in http_proxy https_proxy ftp_proxy no_proxy NO_PROXY; do
|
||||
if [ -n "$(eval echo \$${var})" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user