Fixed broken examples in docs

Upstream-commit: 4a086dfc0859fb3053925f1651d39056ef7dbfd6
Component: engine
This commit is contained in:
Solomon Hykes
2013-03-26 20:28:46 -07:00
parent e47391f32c
commit 3c193f2186

View File

@ -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)