Keeping Docker Script Running After Closing Console: Seeking Assistance

Hello everyone,

I’ve initiated a script on my server, and it seems to be working perfectly. However, I’m facing an issue: once I launch the following command:

cd /var/www/vhosts/my_Site.com/httpdocs/server
docker/build.sh
MEDIASOUP_ANNOUNCED_IP=my_ip ./docker/run.sh

The script starts successfully, but if I close the console where I launched it, the script stops. I would like to know how I can keep it running even after closing the console, using Docker.

Thanks to anyone who can provide me with an answer.
Use centos 7

Because such a run.sh script was NEVER intended to be used within Docker. It enables INTERACTIVE=true env variable so the terminal console is launched and by design, when closed, it closes the demo.

A workaround (if you want to keep using that run.sh script in Docker) is to set INTERACTIVE=false environment variable.

1 Like