I'm just wondering how to properly detach a running container if it was started from VSCode's integrated terminal?
On a Mac CTRL+P CTRL+Q doesn't work.
To stop a container, use CTRL-c . This key sequence sends SIGKILL to the container. If --sig-proxy is true (the default), CTRL-c sends a SIGINT to the container. If the container was run with -i and -t , you can detach from a container and leave it running using the CTRL-p CTRL-q key sequence.
Run Hub docker container Note that pressing `Ctrl+C` when the terminal is attached to a container output causes the container to shut down. Use `Ctrl+PQ` in order to detach the terminal from container output.
if you want to detach from container without exiting(without killing the bash shell), By default , you can use ctrl-p,q . it will come out of container without exiting from the container(running background.
To start a container in detached mode, you use -d=true or just -d option. By design, containers started in detached mode exit when the root process used to run the container exits, unless you also specify the --rm option.
Menu under File > Preferences > Keyboard Shortcuts. (Code > Preferences > Keyboard Shortcuts on macOS)
Add !terminalFocus
to When
option for CTRL+Q
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