Browse code

Merge pull request #9683 from SvenDowideit/docker-exec-error-when-paused

Update the documentation for #9356 fix

Fred Lifton authored on 2014/12/18 10:04:25
Showing 1 changed files
... ...
@@ -867,8 +867,17 @@ The `docker exec` command runs a new command in a running container.
867 867
 The command started using `docker exec` will only run while the container's primary
868 868
 process (`PID 1`) is running, and will not be restarted if the container is restarted.
869 869
 
870
-If the container is paused, then the `docker exec` command will wait until the
871
-container is unpaused, and then run.
870
+If the container is paused, then the `docker exec` command will fail with an error:
871
+
872
+    $ docker pause test
873
+    test
874
+    $ docker ps
875
+    CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                   PORTS               NAMES
876
+    1ae3b36715d2        ubuntu:latest       "bash"              17 seconds ago      Up 16 seconds (Paused)                       test
877
+    $ docker exec test ls
878
+    FATA[0000] Error response from daemon: Container test is paused, unpause the container before exec
879
+    $ echo $?
880
+    1
872 881
 
873 882
 #### Examples
874 883