I have a bash script that is supposed to execute other bash scripts using "docker exec" which are installed in different docker containers. Although each command works correctly when started manually, the script stops after the execution of first docker exec command.
Example:
#!/bin/bash
...
docker exec -it mysql_container /scripts/import_database.sh ## Scripts stops here...
docker exec -it web_container /scripts/copy_doc_root.sh
...
What am I missing? ;)
Thanks for your help! David
Use docker exec -d since you neither want a terminal nor an interactive session.
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