I can attach to a docker process but Ctrl+c doesn't work to detach from it. exit
basically halts the process.
What's the recommended workflow to have the process running, occasionally attaching to it to make some changes, and then detaching?
Docker supports a keyboard combination to gracefully detach from a container. Press Ctrl-P, followed by Ctrl-Q, to detach from your connection. You'll be dropped back into your shell but the previously attached process will remain alive, keeping your container running.
By default, a Docker Compose starts the services in the foreground mode just like a docker run command. To run the Docker Compose in the background, a docker-compose up command should be started with the -d or --detach option.
To remove one or more Docker volumes, run the docker volume ls command to find the ID of the volumes you want to remove. If you get an error similar to the one shown below, it means that an existing container uses the volume. To remove the volume, you will have to remove the container first.
To detach the tty without exiting the shell, use the escape sequence Ctrl+P followed by Ctrl+Q. More details here.
Additional info from this source:
^P^Q
and reattached with docker attach^P^Q
; will disrupt stdin^P^Q
; can SIGKILL client; can reattach with docker attachCheck out also the --sig-proxy
option:
docker attach --sig-proxy=false 304f5db405ec
Then use CTRL+c to detach
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