Fixed broken examples in docs
This commit is contained in:
parent
00b81936aa
commit
4a086dfc08
1 changed files with 3 additions and 3 deletions
|
@ -26,10 +26,10 @@ Starting a long-running worker process
|
|||
.. code-block:: bash
|
||||
|
||||
# Run docker in daemon mode
|
||||
(docker -d || echo "Docker daemon already running") &
|
||||
(sudo docker -d || echo "Docker daemon already running") &
|
||||
|
||||
# Start a very useful long-running process
|
||||
JOB=$(docker run base /bin/sh -c "while true; do echo Hello world!; sleep 1; done")
|
||||
JOB=$(docker run -d base /bin/sh -c "while true; do echo Hello world; sleep 1; done")
|
||||
|
||||
# Collect the output of the job so far
|
||||
docker logs $JOB
|
||||
|
@ -51,7 +51,7 @@ Expose a service on a TCP port
|
|||
.. code-block:: bash
|
||||
|
||||
# Expose port 4444 of this container, and tell netcat to listen on it
|
||||
JOB=$(docker run -p 4444 base /bin/nc -l -p 4444)
|
||||
JOB=$(docker run -d -p 4444 base /bin/nc -l -p 4444)
|
||||
|
||||
# Which public port is NATed to my container?
|
||||
PORT=$(docker port $JOB 4444)
|
||||
|
|
Loading…
Add table
Reference in a new issue