mirror of
https://github.com/docker/compose.git
synced 2025-07-07 22:04:29 +02:00
Merge pull request #2913 from clkao/container-install-fixes
A few fixes to the container-based install, which is broken on:
This commit is contained in:
commit
50dc27aed7
@ -31,7 +31,9 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# Setup volume mounts for compose config and context
|
# Setup volume mounts for compose config and context
|
||||||
VOLUMES="-v $(pwd):$(pwd)"
|
if [ "$(pwd)" != '/' ]; then
|
||||||
|
VOLUMES="-v $(pwd):$(pwd)"
|
||||||
|
fi
|
||||||
if [ -n "$COMPOSE_FILE" ]; then
|
if [ -n "$COMPOSE_FILE" ]; then
|
||||||
compose_dir=$(dirname $COMPOSE_FILE)
|
compose_dir=$(dirname $COMPOSE_FILE)
|
||||||
fi
|
fi
|
||||||
@ -45,9 +47,10 @@ fi
|
|||||||
|
|
||||||
# Only allocate tty if we detect one
|
# Only allocate tty if we detect one
|
||||||
if [ -t 1 ]; then
|
if [ -t 1 ]; then
|
||||||
DOCKER_RUN_OPTIONS="-ti"
|
DOCKER_RUN_OPTIONS="-t"
|
||||||
else
|
fi
|
||||||
DOCKER_RUN_OPTIONS="-i"
|
if [ -t 0 ]; then
|
||||||
|
DOCKER_RUN_OPTIONS="$DOCKER_RUN_OPTIONS -i"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec docker run --rm $DOCKER_RUN_OPTIONS $DOCKER_ADDR $COMPOSE_OPTIONS $VOLUMES -w $(pwd) $IMAGE $@
|
exec docker run --rm $DOCKER_RUN_OPTIONS $DOCKER_ADDR $COMPOSE_OPTIONS $VOLUMES -w "$(pwd)" $IMAGE "$@"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user