Docker detach container
Docker container stop once the main program it started with stop running. If you start a docker container with console using -ti option, it stop when you disconnect.
To avoid process getting stopped, you can detach from the console.
This is done by pressing keys
1 |
CTRL + P |
Followed by
1 |
CTRL + Q |
You can just press CTRL key, then press “p”, then “q”.