Describe the bug-d or --detach option not passed to docker-compose run operation. Specifically testing on pelias prepare step OPTS
Steps to Reproduce
bash -x ./docker/pelias prepare interpolation -d
.... Okay, please see output from script: Does docker-compose invocation have the detach option? Nope.
Well, if you try any other options -- valid compose or invalid options -- do they appear? Nope.
What you see now is that the docker container for prepare step is in foreground still and not detaching.
Expected behavior
CURRENT:
docker-compose run --rm -T interpolation bash ./docker_build.sh
DESIRED:
docker-compose run --rm --detach -T interpolation bash ./docker_build.sh ... Or any other valid compose options inserted in the right spot.
Environment (please complete the following information):
docker 19.0x on RHEL
pelias latest
Additional context
Possible solution that works for me:
export RUN_DETACHED=1 with
cmd/docker.sh tweaks below:
DETACH_ARG=
if [ "$RUN_DETACHED" = "1" ]; then
DETACH_ARG="--detach"
fi
function compose_run(){ net_init; docker-compose run --rm $DETACH_ARG $@; }
register 'compose' 'run' 'execute a docker-compose run command' compose_run
Describe the bug
-d
or--detach
option not passed todocker-compose run
operation. Specifically testing onpelias prepare step OPTS
Steps to Reproduce
bash -x ./docker/pelias prepare interpolation -d
.... Okay, please see output from script: Does
docker-compose
invocation have the detach option? Nope. Well, if you try any other options -- valid compose or invalid options -- do they appear? Nope.What you see now is that the docker container for
prepare
step is in foreground still and not detaching.Expected behavior
CURRENT:
docker-compose run --rm -T interpolation bash ./docker_build.sh
DESIRED:
docker-compose run --rm --detach -T interpolation bash ./docker_build.sh
... Or any other valid compose options inserted in the right spot.Environment (please complete the following information):
Additional context
Possible solution that works for me:
export RUN_DETACHED=1
withcmd/docker.sh
tweaks below:References