To detach from a container, you hold
Ctrl and press
This only works if the container was started with both
If this doesn’t work for some reason, try:
docker stop <containerid>
To attach to a running container you use:
docker container attach "container_name"