I am using EC2 UserData to bootstrap the instance.
TRacking log of bootstrap execution /var/log/cloud-init-output.log
, I found that the script was stopped at :
+ docker-compose exec web python /var/www/flask/app/db_fixtures.py
the input device is not a TTY
It seems like this command it's running in interactive mode, but why ? and how to force noninteractive mode for this command (docker-compose exec) ?
Citing from the docker-compose exec
docs:
Commands are by default allocating a TTY, so you can use a command such as docker-compose exec web sh to get an interactive prompt.
To disable this behavior, you can either the -T
flag to disable pseudo-tty allocation:
docker-compose exec -T web python /var/www/flask/app/db_fixtures.py
Or set the COMPOSE_INTERACTIVE_NO_CLI
environment variable to 1 before running docker-compose exec
:
export COMPOSE_INTERACTIVE_NO_CLI=1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With