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/

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 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 script in Docker) is to set INTERACTIVE=false environment variable.

1 Like