If COMPOSE_FILE is define then set this variable to the container

Signed-off-by: Pascal Vibet <pvibet@gmail.com>
This commit is contained in:
Pascal Vibet 2017-04-26 13:50:22 +02:00 committed by Joffrey F
parent 5b6637d7f8
commit 7dafbd1e9c
1 changed files with 1 additions and 0 deletions

View File

@ -35,6 +35,7 @@ if [ "$(pwd)" != '/' ]; then
VOLUMES="-v $(pwd):$(pwd)"
fi
if [ -n "$COMPOSE_FILE" ]; then
COMPOSE_OPTIONS="$COMPOSE_OPTIONS -e COMPOSE_FILE=$COMPOSE_FILE"
compose_dir=$(realpath $(dirname $COMPOSE_FILE))
fi
# TODO: also check --file argument