mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-05 13:11:30 +00:00
Merge remote-tracking branch 'dotcloud/master' into local/dotcloud/docs
This commit is contained in:
@@ -13,11 +13,11 @@ Running an interactive shell
|
||||
.. code-block:: bash
|
||||
|
||||
# Download a base image
|
||||
docker import base
|
||||
docker pull base
|
||||
|
||||
# Run an interactive shell in the base image,
|
||||
# allocate a tty, attach stdin and stdout
|
||||
docker run -a -i -t base /bin/bash
|
||||
docker run -i -t base /bin/bash
|
||||
|
||||
|
||||
Starting a long-running worker process
|
||||
@@ -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)
|
||||
|
||||
@@ -12,9 +12,9 @@ The goal of this example is to show you how you can author your own docker image
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ docker import shykes/pybuilder
|
||||
$ docker pull shykes/pybuilder
|
||||
|
||||
We are importing the "shykes/pybuilder" docker image
|
||||
We are downloading the "shykes/pybuilder" docker image
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ You are now ready for the docker’s “hello world” example. Run
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker run -a busybox echo hello world
|
||||
docker run busybox echo hello world
|
||||
|
||||
.. image:: images/win/run_04.gif
|
||||
:alt: run docker
|
||||
|
||||
Reference in New Issue
Block a user