1
0
mirror of https://github.com/docker/docs.git synced 2026-11-01 22:34:29 +03: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:
Aanand Prasad
2016-02-18 09:24:10 -08:00

View File

@@ -31,7 +31,9 @@ fi
# 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
compose_dir=$(dirname $COMPOSE_FILE)
fi
@@ -45,9 +47,10 @@ fi
# Only allocate tty if we detect one
if [ -t 1 ]; then
DOCKER_RUN_OPTIONS="-ti"
else
DOCKER_RUN_OPTIONS="-i"
DOCKER_RUN_OPTIONS="-t"
fi
if [ -t 0 ]; then
DOCKER_RUN_OPTIONS="$DOCKER_RUN_OPTIONS -i"
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 "$@"