Makefile hangs when docker-compose -d is used and fails with code 129 without -d

for reference, my rule looks like this:

aRule:
    docker-compose exec -d service /bin/bash -c "/path/to/drush -y drush-commmand"

      

On Ubuntu 16.04 and 14.04, if I run a command like docker-compose exec -d service /bin/bash -c "/path/to/drush -y drush-commmand

in a Makefile rule, the Makefile hangs and then crashes due to a MemoryError from a docker container. However, this command works in both centto and docker machine.

I try to substitute a command docker-compose exec service /bin/bash -c "path/to/drush -y drush-command

(without the -d flag) and this time the drush command succeeds, however the Makefile fails with an error code 129

.

Then I will try to fix the problem with a modified command docker-compose exec service /bin/bash -c "path/to/drush -y drush-command 1>/dev/null"

, this works ... but seems a little hacky

What is the correct way to do this and why am I getting the above errors?

+3


source to share





All Articles