Browse code

Merge pull request #5564 from felixrabe/patch-4

cli.md: sudo at the right place

O.S. Tezer authored on 2014/05/03 20:36:31
Showing 1 changed files
... ...
@@ -994,7 +994,7 @@ the same mode (read write or read only) as the reference container.
994 994
 The `-a` flag tells `docker run` to bind to the container's stdin, stdout or
995 995
 stderr. This makes it possible to manipulate the output and input as needed.
996 996
 
997
-    $ sudo echo "test" | docker run -i -a stdin ubuntu cat -
997
+    $ echo "test" | sudo docker run -i -a stdin ubuntu cat -
998 998
 
999 999
 This pipes data into a container and prints the container's ID by attaching
1000 1000
 only to the container'sstdin.
... ...
@@ -1005,7 +1005,7 @@ This isn't going to print anything unless there's an error because We've
1005 1005
 only attached to the stderr of the container. The container's logs still
1006 1006
    store what's been written to stderr and stdout.
1007 1007
 
1008
-    $ sudo cat somefile | docker run -i -a stdin mybuilder dobuild
1008
+    $ cat somefile | sudo docker run -i -a stdin mybuilder dobuild
1009 1009
 
1010 1010
 This is how piping a file into a container could be done for a build.
1011 1011
 The container's ID will be printed after the build is done and the build