1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Hello World: fix detach behavior

The hello world example relies on being able to exit the container attachment using Control-C without stopping it. According to this thread (and my own experience), this doesn't work anymore:

https://groups.google.com/forum/#!msg/docker-user/nWXAnyLP9-M/kbv-FZpF4rUJ

Added -sig-proxy=false to the attach command.
This commit is contained in:
Gert van Valkenhoef 2014-01-08 10:58:55 +01:00
parent 322a42b8a2
commit c9cebf3a73

View file

@ -125,12 +125,14 @@ Check the logs make sure it is working correctly.
.. code-block:: bash .. code-block:: bash
sudo docker attach $CONTAINER_ID sudo docker attach -sig-proxy=false $CONTAINER_ID
Attach to the container to see the results in real-time. Attach to the container to see the results in real-time.
- **"docker attach**" This will allow us to attach to a background - **"docker attach**" This will allow us to attach to a background
process to see what is going on. process to see what is going on.
- "-sig-proxy=false" Do not forward signals to the container; allows
us to exit the attachment using Control-C without stopping the container.
- **$CONTAINER_ID** The Id of the container we want to attach too. - **$CONTAINER_ID** The Id of the container we want to attach too.
Exit from the container attachment by pressing Control-C. Exit from the container attachment by pressing Control-C.