I run that:
docker run -it --restart always --net=host myImage /bin/bash
And I stay interactive then I run (inside the docker container)
/start.sh
and everything is ok
My idea is to run /start.sh directly with docker run command
I tried that:
docker run -it --restart always --net=host myImage /bin/bash -c "/start.sh"
Which seems to work, but once the start.sh finishes tasks, docker quits the interactive mode
start.sh only contains starting service
service apache start;
service mysql start;
pm2 start /chat.js;