|
|
@ -167,6 +167,9 @@ mk_docker_run_options() { |
|
|
|
|
|
|
|
docker_run_opts+=("-v" "$HOME/.docker:/root/.docker") |
|
|
|
|
|
|
|
COMPOSE_DOCKER_IMAGE=${COMPOSE_DOCKER_IMAGE:-docker.0k.io/compose} |
|
|
|
docker_run_opts+=("-e" "COMPOSE_DOCKER_IMAGE=$COMPOSE_DOCKER_IMAGE") |
|
|
|
|
|
|
|
COMPOSE_LAUNCHER_BIN=$(readlink -f "${BASH_SOURCE[0]}") |
|
|
|
|
|
|
|
filename=$(mktemp -p /tmp/ -t launch_opts-XXXXXXXXXXXXXXXX) |
|
|
@ -196,9 +199,16 @@ run() { |
|
|
|
|
|
|
|
while read-0 opt; do |
|
|
|
docker_run_opts+=("$opt") |
|
|
|
## catch COMPOSE_DOCKER_IMAGE |
|
|
|
if [[ "$env" == "true" && "$opt" == "COMPOSE_DOCKER_IMAGE="* ]]; then |
|
|
|
COMPOSE_DOCKER_IMAGE=${opt##COMPOSE_DOCKER_IMAGE=} |
|
|
|
elif [ "$opt" == "-e" ]; then |
|
|
|
env=true |
|
|
|
else |
|
|
|
env= |
|
|
|
fi |
|
|
|
done < <(cat "$COMPOSE_LAUNCHER_OPTS") |
|
|
|
|
|
|
|
COMPOSE_DOCKER_IMAGE=${COMPOSE_DOCKER_IMAGE:-docker.0k.io/compose} |
|
|
|
if [ -t 0 ]; then |
|
|
|
docker_run_opts+=("-i") |
|
|
|
fi |
|
|
|