mirror of
https://github.com/docker/compose.git
synced 2025-07-23 13:45:00 +02:00
Always connect Compose container to stdin
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
0612d973c7
commit
fee5261014
@ -47,14 +47,14 @@ if [ -n "$HOME" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Only allocate tty if we detect one
|
# Only allocate tty if we detect one
|
||||||
if [ -t 0 ]; then
|
if [ -t 0 -a -t 1 ]; then
|
||||||
if [ -t 1 ]; then
|
|
||||||
DOCKER_RUN_OPTIONS="$DOCKER_RUN_OPTIONS -t"
|
DOCKER_RUN_OPTIONS="$DOCKER_RUN_OPTIONS -t"
|
||||||
fi
|
|
||||||
else
|
|
||||||
DOCKER_RUN_OPTIONS="$DOCKER_RUN_OPTIONS -i"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Always set -i to support piped and terminal input in run/exec
|
||||||
|
DOCKER_RUN_OPTIONS="$DOCKER_RUN_OPTIONS -i"
|
||||||
|
|
||||||
|
|
||||||
# Handle userns security
|
# Handle userns security
|
||||||
if [ ! -z "$(docker info 2>/dev/null | grep userns)" ]; then
|
if [ ! -z "$(docker info 2>/dev/null | grep userns)" ]; then
|
||||||
DOCKER_RUN_OPTIONS="$DOCKER_RUN_OPTIONS --userns=host"
|
DOCKER_RUN_OPTIONS="$DOCKER_RUN_OPTIONS --userns=host"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user