summaryrefslogtreecommitdiff
path: root/docs/sources
diff options
context:
space:
mode:
authorunclejack <unclejack@users.noreply.github.com>2014-04-09 01:56:01 +0300
committerunclejack <unclejack@users.noreply.github.com>2014-04-09 01:56:01 +0300
commite128a606e39fa63c6b4fd6e53a1d88cf00aad868 (patch)
tree199ee7eb6678ffecd2ddad95fce794c795ad5183 /docs/sources
parent143c9707a9fafc39e1d9747f528db97b2564f01e (diff)
parentdc9c28f51d669d6b09e81c2381f800f1a33bb659 (diff)
downloaddocker-e128a606e39fa63c6b4fd6e53a1d88cf00aad868.tar.gz
Merge pull request #5079 from unclejack/bump_v0.10.0release-0.100.10.1-hotfixes
Bump version to v0.10.0
Diffstat (limited to 'docs/sources')
-rw-r--r--docs/sources/articles/runmetrics.rst2
-rw-r--r--docs/sources/articles/security.rst6
-rw-r--r--docs/sources/examples/apt-cacher-ng.Dockerfile15
-rw-r--r--docs/sources/examples/apt-cacher-ng.rst102
-rw-r--r--docs/sources/examples/example_header.inc1
-rw-r--r--docs/sources/examples/hello_world.rst34
-rw-r--r--docs/sources/examples/https.rst126
-rw-r--r--docs/sources/examples/index.rst2
-rw-r--r--docs/sources/examples/mongodb.rst6
-rw-r--r--docs/sources/examples/nodejs_web_app.rst6
-rw-r--r--docs/sources/examples/postgresql_service.Dockerfile2
-rw-r--r--docs/sources/examples/postgresql_service.rst10
-rw-r--r--docs/sources/examples/python_web_app.rst2
-rw-r--r--docs/sources/examples/running_redis_service.rst8
-rw-r--r--docs/sources/examples/running_riak_service.rst2
-rw-r--r--docs/sources/examples/running_ssh_service.rst4
-rw-r--r--docs/sources/installation/amazon.rst32
-rw-r--r--docs/sources/installation/binaries.rst15
-rw-r--r--docs/sources/installation/fedora.rst8
-rw-r--r--docs/sources/installation/index.rst1
-rw-r--r--docs/sources/installation/mac.rst11
-rw-r--r--docs/sources/installation/rhel.rst4
-rw-r--r--docs/sources/installation/softlayer.rst25
-rw-r--r--docs/sources/installation/ubuntulinux.rst31
-rw-r--r--docs/sources/reference/api/docker_io_accounts_api.rst8
-rw-r--r--docs/sources/reference/api/docker_remote_api.rst5
-rw-r--r--docs/sources/reference/api/docker_remote_api_v1.10.rst6
-rw-r--r--docs/sources/reference/api/docker_remote_api_v1.2.rst4
-rw-r--r--docs/sources/reference/api/docker_remote_api_v1.3.rst4
-rw-r--r--docs/sources/reference/api/docker_remote_api_v1.4.rst4
-rw-r--r--docs/sources/reference/api/docker_remote_api_v1.5.rst4
-rw-r--r--docs/sources/reference/api/docker_remote_api_v1.6.rst4
-rw-r--r--docs/sources/reference/api/docker_remote_api_v1.7.rst4
-rw-r--r--docs/sources/reference/api/docker_remote_api_v1.8.rst4
-rw-r--r--docs/sources/reference/api/docker_remote_api_v1.9.rst4
-rw-r--r--docs/sources/reference/api/remote_api_client_libraries.rst6
-rw-r--r--docs/sources/reference/builder.rst89
-rw-r--r--docs/sources/reference/commandline/cli.rst411
-rw-r--r--docs/sources/reference/run.rst97
-rw-r--r--docs/sources/terms/images/docker-filesystems-busyboxrw.pngbin121141 -> 113106 bytes
-rw-r--r--docs/sources/terms/images/docker-filesystems-debian.pngbin77822 -> 64585 bytes
-rw-r--r--docs/sources/terms/images/docker-filesystems-debianrw.pngbin94218 -> 80992 bytes
-rw-r--r--docs/sources/terms/images/docker-filesystems-generic.pngbin78384 -> 67894 bytes
-rw-r--r--docs/sources/terms/images/docker-filesystems-multilayer.pngbin127744 -> 118391 bytes
-rw-r--r--docs/sources/terms/images/docker-filesystems-multiroot.pngbin72247 -> 63920 bytes
-rw-r--r--docs/sources/terms/images/docker-filesystems.svg131
-rw-r--r--docs/sources/use/ambassador_pattern_linking.rst28
-rw-r--r--docs/sources/use/basics.rst4
-rw-r--r--docs/sources/use/chef.rst95
-rw-r--r--docs/sources/use/host_integration.rst5
-rw-r--r--docs/sources/use/index.rst1
-rw-r--r--docs/sources/use/networking.rst4
-rw-r--r--docs/sources/use/port_redirection.rst6
-rw-r--r--docs/sources/use/working_with_links_names.rst26
-rw-r--r--docs/sources/use/working_with_volumes.rst22
-rw-r--r--docs/sources/use/workingwithrepository.rst2
56 files changed, 937 insertions, 496 deletions
diff --git a/docs/sources/articles/runmetrics.rst b/docs/sources/articles/runmetrics.rst
index afb7f82e39..6b705fb737 100644
--- a/docs/sources/articles/runmetrics.rst
+++ b/docs/sources/articles/runmetrics.rst
@@ -63,7 +63,7 @@ For Docker containers using cgroups, the container name will be the
full ID or long ID of the container. If a container shows up as
ae836c95b4c3 in ``docker ps``, its long ID might be something like
``ae836c95b4c3c9e9179e0e91015512da89fdec91612f63cebae57df9a5444c79``. You
-can look it up with ``docker inspect`` or ``docker ps -notrunc``.
+can look it up with ``docker inspect`` or ``docker ps --no-trunc``.
Putting everything together to look at the memory metrics for a Docker
container, take a look at ``/sys/fs/cgroup/memory/lxc/<longid>/``.
diff --git a/docs/sources/articles/security.rst b/docs/sources/articles/security.rst
index 3dc5780e85..ec2ab9bffd 100644
--- a/docs/sources/articles/security.rst
+++ b/docs/sources/articles/security.rst
@@ -7,7 +7,7 @@
Docker Security
===============
- *Adapted from* `Containers & Docker: How Secure are They? <blogsecurity>`_
+ *Adapted from* `Containers & Docker: How Secure are They? <blogsecurity_>`_
There are three major areas to consider when reviewing Docker security:
@@ -82,6 +82,8 @@ when some applications start to misbehave.
Control Groups have been around for a while as well: the code was
started in 2006, and initially merged in kernel 2.6.24.
+.. _dockersecurity_daemon:
+
Docker Daemon Attack Surface
----------------------------
@@ -261,7 +263,7 @@ with Docker, since everything is provided by the kernel anyway.
For more context and especially for comparisons with VMs and other
container systems, please also see the `original blog post
-<blogsecurity>`_.
+<blogsecurity_>`_.
.. _blogsecurity: http://blog.docker.io/2013/08/containers-docker-how-secure-are-they/
diff --git a/docs/sources/examples/apt-cacher-ng.Dockerfile b/docs/sources/examples/apt-cacher-ng.Dockerfile
new file mode 100644
index 0000000000..3b7862bb58
--- /dev/null
+++ b/docs/sources/examples/apt-cacher-ng.Dockerfile
@@ -0,0 +1,15 @@
+#
+# Build: docker build -t apt-cacher .
+# Run: docker run -d -p 3142:3142 --name apt-cacher-run apt-cacher
+#
+# and then you can run containers with:
+# docker run -t -i --rm -e http_proxy http://dockerhost:3142/ debian bash
+#
+FROM ubuntu
+MAINTAINER SvenDowideit@docker.com
+
+VOLUME ["/var/cache/apt-cacher-ng"]
+RUN apt-get update ; apt-get install -yq apt-cacher-ng
+
+EXPOSE 3142
+CMD chmod 777 /var/cache/apt-cacher-ng ; /etc/init.d/apt-cacher-ng start ; tail -f /var/log/apt-cacher-ng/*
diff --git a/docs/sources/examples/apt-cacher-ng.rst b/docs/sources/examples/apt-cacher-ng.rst
new file mode 100644
index 0000000000..dd844d4ef1
--- /dev/null
+++ b/docs/sources/examples/apt-cacher-ng.rst
@@ -0,0 +1,102 @@
+:title: Running an apt-cacher-ng service
+:description: Installing and running an apt-cacher-ng service
+:keywords: docker, example, package installation, networking, debian, ubuntu
+
+.. _running_apt-cacher-ng_service:
+
+Apt-Cacher-ng Service
+=====================
+
+.. include:: example_header.inc
+
+
+When you have multiple Docker servers, or build unrelated Docker containers
+which can't make use of the Docker build cache, it can be useful to have a
+caching proxy for your packages. This container makes the second download of
+any package almost instant.
+
+Use the following Dockerfile:
+
+.. literalinclude:: apt-cacher-ng.Dockerfile
+
+To build the image using:
+
+.. code-block:: bash
+
+ $ sudo docker build -t eg_apt_cacher_ng .
+
+Then run it, mapping the exposed port to one on the host
+
+.. code-block:: bash
+
+ $ sudo docker run -d -p 3142:3142 --name test_apt_cacher_ng eg_apt_cacher_ng
+
+To see the logfiles that are 'tailed' in the default command, you can use:
+
+.. code-block:: bash
+
+ $ sudo docker logs -f test_apt_cacher_ng
+
+To get your Debian-based containers to use the proxy, you can do one of three things
+
+1. Add an apt Proxy setting ``echo 'Acquire::http { Proxy "http://dockerhost:3142"; };' >> /etc/apt/conf.d/01proxy``
+2. Set an environment variable: ``http_proxy=http://dockerhost:3142/``
+3. Change your ``sources.list`` entries to start with ``http://dockerhost:3142/``
+
+**Option 1** injects the settings safely into your apt configuration in a local
+version of a common base:
+
+.. code-block:: bash
+
+ FROM ubuntu
+ RUN echo 'Acquire::http { Proxy "http://dockerhost:3142"; };' >> /etc/apt/apt.conf.d/01proxy
+ RUN apt-get update ; apt-get install vim git
+
+ # docker build -t my_ubuntu .
+
+**Option 2** is good for testing, but will
+break other HTTP clients which obey ``http_proxy``, such as ``curl``, ``wget`` and others:
+
+.. code-block:: bash
+
+ $ sudo docker run --rm -t -i -e http_proxy=http://dockerhost:3142/ debian bash
+
+**Option 3** is the least portable, but there will be times when you might need to
+do it and you can do it from your ``Dockerfile`` too.
+
+Apt-cacher-ng has some tools that allow you to manage the repository, and they
+can be used by leveraging the ``VOLUME`` instruction, and the image we built to run the
+service:
+
+.. code-block:: bash
+
+ $ sudo docker run --rm -t -i --volumes-from test_apt_cacher_ng eg_apt_cacher_ng bash
+
+ $$ /usr/lib/apt-cacher-ng/distkill.pl
+ Scanning /var/cache/apt-cacher-ng, please wait...
+ Found distributions:
+ bla, taggedcount: 0
+ 1. precise-security (36 index files)
+ 2. wheezy (25 index files)
+ 3. precise-updates (36 index files)
+ 4. precise (36 index files)
+ 5. wheezy-updates (18 index files)
+
+ Found architectures:
+ 6. amd64 (36 index files)
+ 7. i386 (24 index files)
+
+ WARNING: The removal action may wipe out whole directories containing
+ index files. Select d to see detailed list.
+
+ (Number nn: tag distribution or architecture nn; 0: exit; d: show details; r: remove tagged; q: quit): q
+
+
+Finally, clean up after your test by stopping and removing the container, and
+then removing the image.
+
+.. code-block:: bash
+
+ $ sudo docker stop test_apt_cacher_ng
+ $ sudo docker rm test_apt_cacher_ng
+ $ sudo docker rmi eg_apt_cacher_ng
diff --git a/docs/sources/examples/example_header.inc b/docs/sources/examples/example_header.inc
index 0621b39794..5841141e59 100644
--- a/docs/sources/examples/example_header.inc
+++ b/docs/sources/examples/example_header.inc
@@ -4,4 +4,5 @@
* This example assumes you have Docker running in daemon mode. For
more information please see :ref:`running_examples`.
* **If you don't like sudo** then see :ref:`dockergroup`
+ * **If you're using OS X or docker via TCP** then you shouldn't use `sudo`
diff --git a/docs/sources/examples/hello_world.rst b/docs/sources/examples/hello_world.rst
index 63362e7d7b..39d7abea2c 100644
--- a/docs/sources/examples/hello_world.rst
+++ b/docs/sources/examples/hello_world.rst
@@ -52,8 +52,8 @@ This command will run a simple ``echo`` command, that will echo ``hello world``
**Explanation:**
-- **"sudo"** execute the following commands as user *root*
-- **"docker run"** run a command in a new container
+- **"sudo"** execute the following commands as user *root*
+- **"docker run"** run a command in a new container
- **"busybox"** is the image we are running the command in.
- **"/bin/echo"** is the command we want to run in the container
- **"hello world"** is the input for the echo command
@@ -67,9 +67,9 @@ See the example in action
.. raw:: html
<iframe width="560" height="400" frameborder="0"
- sandbox="allow-same-origin allow-scripts"
- srcdoc="<body><script type=&quot;text/javascript&quot;
- src=&quot;https://asciinema.org/a/7658.js&quot;
+ sandbox="allow-same-origin allow-scripts"
+ srcdoc="<body><script type=&quot;text/javascript&quot;
+ src=&quot;https://asciinema.org/a/7658.js&quot;
id=&quot;asciicast-7658&quot; async></script></body>">
</iframe>
@@ -92,7 +92,7 @@ we stop it.
.. code-block:: bash
- CONTAINER_ID=$(sudo docker run -d ubuntu /bin/sh -c "while true; do echo hello world; sleep 1; done")
+ container_id=$(sudo docker run -d ubuntu /bin/sh -c "while true; do echo hello world; sleep 1; done")
We are going to run a simple hello world daemon in a new container
made from the ``ubuntu`` image.
@@ -104,30 +104,30 @@ made from the ``ubuntu`` image.
- **"while true; do echo hello world; sleep 1; done"** is the mini
script we want to run, that will just print hello world once a
second until we stop it.
-- **$CONTAINER_ID** the output of the run command will return a
+- **$container_id** the output of the run command will return a
container id, we can use in future commands to see what is going on
with this process.
.. code-block:: bash
- sudo docker logs $CONTAINER_ID
+ sudo docker logs $container_id
Check the logs make sure it is working correctly.
- **"docker logs**" This will return the logs for a container
-- **$CONTAINER_ID** The Id of the container we want the logs for.
+- **$container_id** The Id of the container we want the logs for.
.. code-block:: bash
- sudo docker attach -sig-proxy=false $CONTAINER_ID
+ sudo docker attach --sig-proxy=false $container_id
Attach to the container to see the results in real-time.
- **"docker attach**" This will allow us to attach to a background
process to see what is going on.
-- **"-sig-proxy=false"** Do not forward signals to the container; allows
+- **"--sig-proxy=false"** Do not forward signals to the container; allows
us to exit the attachment using Control-C without stopping the container.
-- **$CONTAINER_ID** The Id of the container we want to attach too.
+- **$container_id** The Id of the container we want to attach to.
Exit from the container attachment by pressing Control-C.
@@ -141,12 +141,12 @@ Check the process list to make sure it is running.
.. code-block:: bash
- sudo docker stop $CONTAINER_ID
+ sudo docker stop $container_id
Stop the container, since we don't need it anymore.
- **"docker stop"** This stops a container
-- **$CONTAINER_ID** The Id of the container we want to stop.
+- **$container_id** The Id of the container we want to stop.
.. code-block:: bash
@@ -162,9 +162,9 @@ See the example in action
.. raw:: html
<iframe width="560" height="400" frameborder="0"
- sandbox="allow-same-origin allow-scripts"
- srcdoc="<body><script type=&quot;text/javascript&quot;
- src=&quot;https://asciinema.org/a/2562.js&quot;
+ sandbox="allow-same-origin allow-scripts"
+ srcdoc="<body><script type=&quot;text/javascript&quot;
+ src=&quot;https://asciinema.org/a/2562.js&quot;
id=&quot;asciicast-2562&quot; async></script></body>">
</iframe>
diff --git a/docs/sources/examples/https.rst b/docs/sources/examples/https.rst
new file mode 100644
index 0000000000..7a221ed951
--- /dev/null
+++ b/docs/sources/examples/https.rst
@@ -0,0 +1,126 @@
+:title: Docker HTTPS Setup
+:description: How to setup docker with https
+:keywords: docker, example, https, daemon
+
+.. _running_docker_https:
+
+Running Docker with https
+=========================
+
+By default, Docker runs via a non-networked Unix socket. It can also optionally
+communicate using a HTTP socket.
+
+If you need Docker reachable via the network in a safe manner, you can enable
+TLS by specifying the `tlsverify` flag and pointing Docker's `tlscacert` flag to a
+trusted CA certificate.
+
+In daemon mode, it will only allow connections from clients authenticated by a
+certificate signed by that CA. In client mode, it will only connect to servers
+with a certificate signed by that CA.
+
+.. warning::
+
+ Using TLS and managing a CA is an advanced topic. Please make you self familiar
+ with openssl, x509 and tls before using it in production.
+
+Create a CA, server and client keys with OpenSSL
+------------------------------------------------
+
+First, initialize the CA serial file and generate CA private and public keys:
+
+.. code-block:: bash
+
+ $ echo 01 > ca.srl
+ $ openssl genrsa -des3 -out ca-key.pem
+ $ openssl req -new -x509 -days 365 -key ca-key.pem -out ca.pem
+
+Now that we have a CA, you can create a server key and certificate signing request.
+Make sure that `"Common Name (e.g. server FQDN or YOUR name)"` matches the hostname you will use
+to connect to Docker or just use '*' for a certificate valid for any hostname:
+
+.. code-block:: bash
+
+ $ openssl genrsa -des3 -out server-key.pem
+ $ openssl req -new -key server-key.pem -out server.csr
+
+Next we're going to sign the key with our CA:
+
+.. code-block:: bash
+
+ $ openssl x509 -req -days 365 -in server.csr -CA ca.pem -CAkey ca-key.pem \
+ -out server-cert.pem
+
+For client authentication, create a client key and certificate signing request:
+
+.. code-block:: bash
+
+ $ openssl genrsa -des3 -out client-key.pem
+ $ openssl req -new -key client-key.pem -out client.csr
+
+
+To make the key suitable for client authentication, create a extensions config file:
+
+.. code-block:: bash
+
+ $ echo extendedKeyUsage = clientAuth > extfile.cnf
+
+Now sign the key:
+
+.. code-block:: bash
+
+ $ openssl x509 -req -days 365 -in client.csr -CA ca.pem -CAkey ca-key.pem \
+ -out client-cert.pem -extfile extfile.cnf
+
+Finally you need to remove the passphrase from the client and server key:
+
+.. code-block:: bash
+
+ $ openssl rsa -in server-key.pem -out server-key.pem
+ $ openssl rsa -in client-key.pem -out client-key.pem
+
+Now you can make the Docker daemon only accept connections from clients providing
+a certificate trusted by our CA:
+
+.. code-block:: bash
+
+ $ sudo docker -d --tlsverify --tlscacert=ca.pem --tlscert=server-cert.pem --tlskey=server-key.pem \
+ -H=0.0.0.0:4243
+
+To be able to connect to Docker and validate its certificate, you now need to provide your client keys,
+certificates and trusted CA:
+
+.. code-block:: bash
+
+ $ docker --tlsverify --tlscacert=ca.pem --tlscert=client-cert.pem --tlskey=client-key.pem \
+ -H=dns-name-of-docker-host:4243
+
+.. warning::
+
+ As shown in the example above, you don't have to run the ``docker``
+ client with ``sudo`` or the ``docker`` group when you use
+ certificate authentication. That means anyone with the keys can
+ give any instructions to your Docker daemon, giving them root
+ access to the machine hosting the daemon. Guard these keys as you
+ would a root password!
+
+Other modes
+-----------
+If you don't want to have complete two-way authentication, you can run Docker in
+various other modes by mixing the flags.
+
+Daemon modes
+~~~~~~~~~~~~
+- tlsverify, tlscacert, tlscert, tlskey set: Authenticate clients
+- tls, tlscert, tlskey: Do not authenticate clients
+
+Client modes
+~~~~~~~~~~~~
+- tls: Authenticate server based on public/default CA pool
+- tlsverify, tlscacert: Authenticate server based on given CA
+- tls, tlscert, tlskey: Authenticate with client certificate, do not authenticate
+ server based on given CA
+- tlsverify, tlscacert, tlscert, tlskey: Authenticate with client certificate,
+ authenticate server based on given CA
+
+The client will send its client certificate if found, so you just need to drop
+your keys into `~/.docker/<ca, cert or key>.pem`
diff --git a/docs/sources/examples/index.rst b/docs/sources/examples/index.rst
index cf9ed9340a..94e2d917bb 100644
--- a/docs/sources/examples/index.rst
+++ b/docs/sources/examples/index.rst
@@ -26,3 +26,5 @@ to more substantial services like those which you might find in production.
using_supervisord
cfengine_process_management
python_web_app
+ apt-cacher-ng
+ https
diff --git a/docs/sources/examples/mongodb.rst b/docs/sources/examples/mongodb.rst
index 3e37d74c30..913dc2699a 100644
--- a/docs/sources/examples/mongodb.rst
+++ b/docs/sources/examples/mongodb.rst
@@ -47,7 +47,7 @@ divert ``/sbin/initctl`` to ``/bin/true`` so it thinks everything is working.
# Hack for initctl not being available in Ubuntu
RUN dpkg-divert --local --rename --add /sbin/initctl
- RUN ln -s /bin/true /sbin/initctl
+ RUN ln -sf /bin/true /sbin/initctl
Afterwards we'll be able to update our apt repositories and install MongoDB
@@ -86,10 +86,10 @@ the local port!
.. code-block:: bash
# Regular style
- MONGO_ID=$(sudo docker run -d <yourname>/mongodb)
+ MONGO_ID=$(sudo docker run -P -d <yourname>/mongodb)
# Lean and mean
- MONGO_ID=$(sudo docker run -d <yourname>/mongodb --noprealloc --smallfiles)
+ MONGO_ID=$(sudo docker run -P -d <yourname>/mongodb --noprealloc --smallfiles)
# Check the logs out
sudo docker logs $MONGO_ID
diff --git a/docs/sources/examples/nodejs_web_app.rst b/docs/sources/examples/nodejs_web_app.rst
index 68c073da7b..55bd76db89 100644
--- a/docs/sources/examples/nodejs_web_app.rst
+++ b/docs/sources/examples/nodejs_web_app.rst
@@ -18,7 +18,7 @@ https://github.com/gasi/docker-node-hello.
Create Node.js app
++++++++++++++++++
-First, create a ``package.json`` file that describes your app and its
+First, create a directory ``src`` where all the files would live. Then create a ``package.json`` file that describes your app and its
dependencies:
.. code-block:: json
@@ -50,7 +50,7 @@ Then, create an ``index.js`` file that defines a web app using the
res.send('Hello World\n');
});
- app.listen(PORT)
+ app.listen(PORT);
console.log('Running on http://localhost:' + PORT);
@@ -91,7 +91,7 @@ To install the right package for CentOS, we’ll use the instructions from the
.. code-block:: bash
# Enable EPEL for Node.js
- RUN rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
+ RUN rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# Install Node.js and npm
RUN yum install -y npm
diff --git a/docs/sources/examples/postgresql_service.Dockerfile b/docs/sources/examples/postgresql_service.Dockerfile
index af1423f258..219a537882 100644
--- a/docs/sources/examples/postgresql_service.Dockerfile
+++ b/docs/sources/examples/postgresql_service.Dockerfile
@@ -7,7 +7,7 @@ MAINTAINER SvenDowideit@docker.com
# Add the PostgreSQL PGP key to verify their Debian packages.
# It should be the same key as https://www.postgresql.org/media/keys/ACCC4CF8.asc
-RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
+RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
# Add PostgreSQL's repository. It contains the most recent stable release
# of PostgreSQL, ``9.3``.
diff --git a/docs/sources/examples/postgresql_service.rst b/docs/sources/examples/postgresql_service.rst
index 5a2323471b..488e1530b2 100644
--- a/docs/sources/examples/postgresql_service.rst
+++ b/docs/sources/examples/postgresql_service.rst
@@ -37,24 +37,24 @@ And run the PostgreSQL server container (in the foreground):
.. code-block:: bash
- $ sudo docker run -rm -P -name pg_test eg_postgresql
+ $ sudo docker run --rm -P --name pg_test eg_postgresql
There are 2 ways to connect to the PostgreSQL server. We can use
:ref:`working_with_links_names`, or we can access it from our host (or the network).
-.. note:: The ``-rm`` removes the container and its image when the container
+.. note:: The ``--rm`` removes the container and its image when the container
exists successfully.
Using container linking
^^^^^^^^^^^^^^^^^^^^^^^
Containers can be linked to another container's ports directly using
-``-link remote_name:local_alias`` in the client's ``docker run``. This will
+``--link remote_name:local_alias`` in the client's ``docker run``. This will
set a number of environment variables that can then be used to connect:
.. code-block:: bash
- $ sudo docker run -rm -t -i -link pg_test:pg eg_postgresql bash
+ $ sudo docker run --rm -t -i --link pg_test:pg eg_postgresql bash
postgres@7ef98b1b7243:/$ psql -h $PG_PORT_5432_TCP_ADDR -p $PG_PORT_5432_TCP_PORT -d docker -U docker --password
@@ -104,7 +104,7 @@ configuration and data:
.. code-block:: bash
- docker run -rm --volumes-from pg_test -t -i busybox sh
+ docker run --rm --volumes-from pg_test -t -i busybox sh
/ # ls
bin etc lib linuxrc mnt proc run sys usr
diff --git a/docs/sources/examples/python_web_app.rst b/docs/sources/examples/python_web_app.rst
index 5b8e3f6b4b..33c038f9ab 100644
--- a/docs/sources/examples/python_web_app.rst
+++ b/docs/sources/examples/python_web_app.rst
@@ -51,7 +51,7 @@ try things out, and then exit when you're done.
.. code-block:: bash
- $ sudo docker run -i -t -name pybuilder_run shykes/pybuilder bash
+ $ sudo docker run -i -t --name pybuilder_run shykes/pybuilder bash
$$ URL=http://github.com/shykes/helloflask/archive/master.tar.gz
$$ /usr/local/bin/buildapp $URL
diff --git a/docs/sources/examples/running_redis_service.rst b/docs/sources/examples/running_redis_service.rst
index c9424867a4..5a5a1b003f 100644
--- a/docs/sources/examples/running_redis_service.rst
+++ b/docs/sources/examples/running_redis_service.rst
@@ -18,11 +18,11 @@ Firstly, we create a ``Dockerfile`` for our new Redis image.
.. code-block:: bash
- FROM ubuntu:12.10
- RUN apt-get update
- RUN apt-get -y install redis-server
+ FROM debian:jessie
+ RUN apt-get update && apt-get install -y redis-server
EXPOSE 6379
ENTRYPOINT ["/usr/bin/redis-server"]
+ CMD ["--bind", "0.0.0.0"]
Next we build an image from our ``Dockerfile``. Replace ``<your username>``
with your own user name.
@@ -49,7 +49,7 @@ use a container link to provide access to our Redis database.
Create your web application container
-------------------------------------
-Next we can create a container for our application. We're going to use the ``-link``
+Next we can create a container for our application. We're going to use the ``--link``
flag to create a link to the ``redis`` container we've just created with an alias of
``db``. This will create a secure tunnel to the ``redis`` container and expose the
Redis instance running inside that container to only this container.
diff --git a/docs/sources/examples/running_riak_service.rst b/docs/sources/examples/running_riak_service.rst
index ae08a4b7f0..55e5e405c9 100644
--- a/docs/sources/examples/running_riak_service.rst
+++ b/docs/sources/examples/running_riak_service.rst
@@ -88,7 +88,7 @@ Almost there. Next, we add a hack to get us by the lack of ``initctl``:
# Hack for initctl
# See: https://github.com/dotcloud/docker/issues/1024
RUN dpkg-divert --local --rename --add /sbin/initctl
- RUN ln -s /bin/true /sbin/initctl
+ RUN ln -sf /bin/true /sbin/initctl
Then, we expose the Riak Protocol Buffers and HTTP interfaces, along with SSH:
diff --git a/docs/sources/examples/running_ssh_service.rst b/docs/sources/examples/running_ssh_service.rst
index d27799bee7..4161275019 100644
--- a/docs/sources/examples/running_ssh_service.rst
+++ b/docs/sources/examples/running_ssh_service.rst
@@ -19,14 +19,14 @@ Build the image using:
.. code-block:: bash
- $ sudo docker build -rm -t eg_sshd .
+ $ sudo docker build -t eg_sshd .
Then run it. You can then use ``docker port`` to find out what host port the container's
port 22 is mapped to:
.. code-block:: bash
- $ sudo docker run -d -P -name test_sshd eg_sshd
+ $ sudo docker run -d -P --name test_sshd eg_sshd
$ sudo docker port test_sshd 22
0.0.0.0:49154
diff --git a/docs/sources/installation/amazon.rst b/docs/sources/installation/amazon.rst
index b5465e25f8..b062a15e1e 100644
--- a/docs/sources/installation/amazon.rst
+++ b/docs/sources/installation/amazon.rst
@@ -9,6 +9,7 @@ Amazon EC2
There are several ways to install Docker on AWS EC2:
+* :ref:`amazonquickstart_new` or
* :ref:`amazonquickstart` or
* :ref:`amazonstandard`
@@ -61,6 +62,37 @@ for every Docker command.
Once you've got Docker installed, you're ready to try it out -- head
on over to the :doc:`../use/basics` or :doc:`../examples/index` section.
+.. _amazonquickstart_new:
+
+Amazon QuickStart (Release Candidate - March 2014)
+--------------------------------------------------
+
+Amazon just published new Docker-ready AMIs (2014.03 Release Candidate). Docker packages
+can now be installed from Amazon's provided Software Repository.
+
+1. **Choose an image:**
+
+ * Launch the `Create Instance Wizard
+ <https://console.aws.amazon.com/ec2/v2/home?#LaunchInstanceWizard:>`_ menu
+ on your AWS Console.
+
+ * Click the ``Community AMI`` menu option on the left side
+
+ * Search for '2014.03' and select one of the Amazon provided AMI, for example ``amzn-ami-pv-2014.03.rc-0.x86_64-ebs``
+
+ * For testing you can use the default (possibly free)
+ ``t1.micro`` instance (more info on `pricing
+ <http://aws.amazon.com/en/ec2/pricing/>`_).
+
+ * Click the ``Next: Configure Instance Details`` button at the bottom right.
+
+2. After a few more standard choices where defaults are probably ok, your Amazon
+ Linux instance should be running!
+
+3. SSH to your instance to install Docker : ``ssh -i <path to your private key> ec2-user@<your public IP address>``
+
+4. Once connected to the instance, type ``sudo yum install -y docker ; sudo service docker start`` to install and start Docker
+
.. _amazonstandard:
Standard Ubuntu Installation
diff --git a/docs/sources/installation/binaries.rst b/docs/sources/installation/binaries.rst
index bfdfbe211f..c31e19acc4 100644
--- a/docs/sources/installation/binaries.rst
+++ b/docs/sources/installation/binaries.rst
@@ -29,6 +29,12 @@ To run properly, docker needs the following software to be installed at runtime:
- iptables version 1.4 or later
- Git version 1.7 or later
- XZ Utils 4.9 or later
+- a `properly mounted
+ <https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount>`_
+ cgroupfs hierarchy (having a single, all-encompassing "cgroup" mount point `is
+ <https://github.com/dotcloud/docker/issues/2683>`_ `not
+ <https://github.com/dotcloud/docker/issues/3485>`_ `sufficient
+ <https://github.com/dotcloud/docker/issues/4568>`_)
Check kernel dependencies
@@ -37,6 +43,9 @@ Check kernel dependencies
Docker in daemon mode has specific kernel requirements. For details,
check your distribution in :ref:`installation_list`.
+In general, a 3.8 Linux kernel (or higher) is preferred, as some of the
+prior versions have known issues that are triggered by Docker.
+
Note that Docker also has a client mode, which can run on virtually
any Linux kernel (it even builds on OSX!).
@@ -49,6 +58,9 @@ Get the docker binary:
wget https://get.docker.io/builds/Linux/x86_64/docker-latest -O docker
chmod +x docker
+.. note::
+ If you have trouble downloading the binary, you can also get the smaller
+ compressed release file: https://get.docker.io/builds/Linux/x86_64/docker-latest.tgz
Run the docker daemon
---------------------
@@ -77,7 +89,8 @@ always run as the root user, but if you run the ``docker`` client as a
user in the *docker* group then you don't need to add ``sudo`` to all
the client commands.
-.. warning:: The *docker* group is root-equivalent.
+.. warning:: The *docker* group (or the group specified with ``-G``) is
+ root-equivalent; see :ref:`dockersecurity_daemon` details.
Upgrades
diff --git a/docs/sources/installation/fedora.rst b/docs/sources/installation/fedora.rst
index 7e0aee78fd..3b95f04f7f 100644
--- a/docs/sources/installation/fedora.rst
+++ b/docs/sources/installation/fedora.rst
@@ -23,15 +23,15 @@ The ``docker-io`` package provides Docker on Fedora.
If you have the (unrelated) ``docker`` package installed already, it will
conflict with ``docker-io``. There's a `bug report`_ filed for it.
-To proceed with ``docker-io`` installation on Fedora 19, please remove
-``docker`` first.
+To proceed with ``docker-io`` installation on Fedora 19 or Fedora 20, please
+remove ``docker`` first.
.. code-block:: bash
sudo yum -y remove docker
-For Fedora 20 and later, the ``wmdocker`` package will provide the same
-functionality as ``docker`` and will also not conflict with ``docker-io``.
+For Fedora 21 and later, the ``wmdocker`` package will provide the same
+functionality as the old ``docker`` and will also not conflict with ``docker-io``.
.. code-block:: bash
diff --git a/docs/sources/installation/index.rst b/docs/sources/installation/index.rst
index 39c1f6a292..ae0e9196fa 100644
--- a/docs/sources/installation/index.rst
+++ b/docs/sources/installation/index.rst
@@ -30,4 +30,5 @@ Contents:
amazon
rackspace
google
+ softlayer
binaries
diff --git a/docs/sources/installation/mac.rst b/docs/sources/installation/mac.rst
index 5139324d0b..9ce3961f7e 100644
--- a/docs/sources/installation/mac.rst
+++ b/docs/sources/installation/mac.rst
@@ -65,11 +65,12 @@ Run the following commands to get it downloaded and set up:
.. code-block:: bash
- # Get the file
- curl -o docker https://get.docker.io/builds/Darwin/x86_64/docker-latest
-
- # Mark it executable
- chmod +x docker
+ # Get the docker client file
+ DIR=$(mktemp -d ${TMPDIR:-/tmp}/dockerdl.XXXXXXX) && \
+ curl -f -o $DIR/ld.tgz https://get.docker.io/builds/Darwin/x86_64/docker-latest.tgz && \
+ gunzip $DIR/ld.tgz && \
+ tar xvf $DIR/ld.tar -C $DIR/ && \
+ cp $DIR/usr/local/bin/docker ./docker
# Set the environment variable for the docker daemon
export DOCKER_HOST=tcp://127.0.0.1:4243
diff --git a/docs/sources/installation/rhel.rst b/docs/sources/installation/rhel.rst
index 7930da6309..151fba6f1f 100644
--- a/docs/sources/installation/rhel.rst
+++ b/docs/sources/installation/rhel.rst
@@ -22,6 +22,9 @@ for the RHEL distribution.
Also note that due to the current Docker limitations, Docker is able to run
only on the **64 bit** architecture.
+You will need `RHEL 6.5`_ or higher, with a RHEL 6 kernel version 2.6.32-431 or higher
+as this has specific kernel fixes to allow Docker to work.
+
Installation
------------
@@ -78,4 +81,5 @@ If you have any issues - please report them directly in the `Red Hat Bugzilla fo
.. _EPEL installation instructions: https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F
.. _Red Hat Bugzilla for docker-io component : https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora%20EPEL&component=docker-io
.. _bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1043676
+.. _RHEL 6.5: https://access.redhat.com/site/articles/3078#RHEL6
diff --git a/docs/sources/installation/softlayer.rst b/docs/sources/installation/softlayer.rst
new file mode 100644
index 0000000000..0fe3d6df5a
--- /dev/null
+++ b/docs/sources/installation/softlayer.rst
@@ -0,0 +1,25 @@
+:title: Installation on IBM SoftLayer
+:description: Please note this project is currently under heavy development. It should not be used in production.
+:keywords: IBM SoftLayer, virtualization, cloud, docker, documentation, installation
+
+IBM SoftLayer
+=============
+
+.. include:: install_header.inc
+
+IBM SoftLayer QuickStart
+-------------------------
+
+1. Create an `IBM SoftLayer account <https://www.softlayer.com/cloudlayer/>`_.
+2. Log in to the `SoftLayer Console <https://control.softlayer.com/devices/>`_.
+3. Go to `Order Hourly Computing Instance Wizard <https://manage.softlayer.com/Sales/orderHourlyComputingInstance>`_ on your SoftLayer Console.
+4. Create a new *CloudLayer Computing Instance* (CCI) using the default values for all the fields and choose:
+
+- *First Available* as ``Datacenter`` and
+- *Ubuntu Linux 12.04 LTS Precise Pangolin - Minimal Install (64 bit)* as ``Operating System``.
+
+5. Click the *Continue Your Order* button at the bottom right and select *Go to checkout*.
+6. Insert the required *User Metadata* and place the order.
+7. Then continue with the :ref:`ubuntu_linux` instructions.
+
+Continue with the :ref:`hello_world` example. \ No newline at end of file
diff --git a/docs/sources/installation/ubuntulinux.rst b/docs/sources/installation/ubuntulinux.rst
index 416d56765e..51f303e88a 100644
--- a/docs/sources/installation/ubuntulinux.rst
+++ b/docs/sources/installation/ubuntulinux.rst
@@ -64,15 +64,26 @@ Installation
an earlier version, you will need to follow them again.
Docker is available as a Debian package, which makes installation
-easy. **See the :ref:`installmirrors` section below if you are not in
+easy. **See the** :ref:`installmirrors` **section below if you are not in
the United States.** Other sources of the Debian packages may be
faster for you to install.
-First add the Docker repository key to your local keychain.
+First, check that your APT system can deal with ``https`` URLs:
+the file ``/usr/lib/apt/methods/https`` should exist. If it doesn't,
+you need to install the package ``apt-transport-https``.
+
+.. code-block:: bash
+
+ [ -e /usr/lib/apt/methods/https ] || {
+ apt-get update
+ apt-get install apt-transport-https
+ }
+
+Then, add the Docker repository key to your local keychain.
.. code-block:: bash
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
+ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
Add the Docker repository to your apt sources list, update and install the
``lxc-docker`` package.
@@ -82,7 +93,7 @@ continue installation.*
.. code-block:: bash
- sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\
+ sudo sh -c "echo deb https://get.docker.io/ubuntu docker main\
> /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker
@@ -144,7 +155,7 @@ First add the Docker repository key to your local keychain.
.. code-block:: bash
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
+ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
Add the Docker repository to your apt sources list, update and install the
``lxc-docker`` package.
@@ -186,7 +197,7 @@ client commands. As of 0.9.0, you can specify that a group other than ``docker``
should own the Unix socket with the ``-G`` option.
.. warning:: The *docker* group (or the group specified with ``-G``) is
- root-equivalent.
+ root-equivalent; see :ref:`dockersecurity_daemon` details.
**Example:**
@@ -282,8 +293,6 @@ incoming connections on the Docker port (default 4243):
sudo ufw allow 4243/tcp
-.. _installmirrors:
-
Docker and local DNS server warnings
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -309,9 +318,9 @@ daemon for the containers:
sudo nano /etc/default/docker
---
# Add:
- DOCKER_OPTS="-dns 8.8.8.8"
+ DOCKER_OPTS="--dns 8.8.8.8"
# 8.8.8.8 could be replaced with a local DNS server, such as 192.168.1.1
- # multiple DNS servers can be specified: -dns 8.8.8.8 -dns 192.168.1.1
+ # multiple DNS servers can be specified: --dns 8.8.8.8 --dns 192.168.1.1
The Docker daemon has to be restarted:
@@ -342,6 +351,8 @@ NetworkManager and Docker need to be restarted afterwards:
.. warning:: This might make DNS resolution slower on some networks.
+.. _installmirrors:
+
Mirrors
^^^^^^^
diff --git a/docs/sources/reference/api/docker_io_accounts_api.rst b/docs/sources/reference/api/docker_io_accounts_api.rst
index 7976f1fddf..dc5c44d4a8 100644
--- a/docs/sources/reference/api/docker_io_accounts_api.rst
+++ b/docs/sources/reference/api/docker_io_accounts_api.rst
@@ -49,14 +49,14 @@ docker.io Accounts API
{
"id": 2,
"username": "janedoe",
- "url": "",
+ "url": "https://www.docker.io/api/v1.1/users/janedoe/",
"date_joined": "2014-02-12T17:58:01.431312Z",
"type": "User",
"full_name": "Jane Doe",
"location": "San Francisco, CA",
"company": "Success, Inc.",
"profile_url": "https://docker.io/",
- "gravatar_email": "jane.doe+gravatar@example.com",
+ "gravatar_url": "https://secure.gravatar.com/avatar/0212b397124be4acd4e7dea9aa357.jpg?s=80&r=g&d=mm"
"email": "jane.doe@example.com",
"is_active": true
}
@@ -111,14 +111,14 @@ docker.io Accounts API
{
"id": 2,
"username": "janedoe",
- "url": "",
+ "url": "https://www.docker.io/api/v1.1/users/janedoe/",
"date_joined": "2014-02-12T17:58:01.431312Z",
"type": "User",
"full_name": "Jane Doe",
"location": "Private Island",
"company": "Retired",
"profile_url": "http://janedoe.com/",
- "gravatar_email": "jane.doe+gravatar@example.com",
+ "gravatar_url": "https://secure.gravatar.com/avatar/0212b397124be4acd4e7dea9aa357.jpg?s=80&r=g&d=mm"
"email": "jane.doe@example.com",
"is_active": true
}
diff --git a/docs/sources/reference/api/docker_remote_api.rst b/docs/sources/reference/api/docker_remote_api.rst
index e1071bf085..7fa8468f3c 100644
--- a/docs/sources/reference/api/docker_remote_api.rst
+++ b/docs/sources/reference/api/docker_remote_api.rst
@@ -22,6 +22,8 @@ Docker Remote API
- Since API version 1.2, the auth configuration is now handled client
side, so the client has to send the authConfig as POST in
/images/(name)/push
+- authConfig, set as the ``X-Registry-Auth`` header, is currently a Base64 encoded (json) string with credentials:
+ ``{'username': string, 'password': string, 'email': string, 'serveraddress' : string}``
2. Versions
===========
@@ -50,6 +52,7 @@ What's new
**New!** You can now use the force parameter to force delete of an image, even if it's
tagged in multiple repositories.
+ **New!** You can now use the noprune parameter to prevent the deletion of parent images
.. http:delete:: /containers/(id)
@@ -203,7 +206,7 @@ What's new
.. http:get:: /images/viz
- This URI no longer exists. The ``images -viz`` output is now generated in
+ This URI no longer exists. The ``images --viz`` output is now generated in
the client, using the ``/images/json`` data.
v1.6
diff --git a/docs/sources/reference/api/docker_remote_api_v1.10.rst b/docs/sources/reference/api/docker_remote_api_v1.10.rst
index ed63525e7e..98827c9eb2 100644
--- a/docs/sources/reference/api/docker_remote_api_v1.10.rst
+++ b/docs/sources/reference/api/docker_remote_api_v1.10.rst
@@ -136,6 +136,7 @@ Create a container
},
"VolumesFrom":"",
"WorkingDir":"",
+ "DisableNetwork": false,
"ExposedPorts":{
"22/tcp": {}
}
@@ -931,6 +932,7 @@ Remove an image
]
:query force: 1/True/true or 0/False/false, default false
+ :query noprune: 1/True/true or 0/False/false, default false
:statuscode 200: no error
:statuscode 404: no such image
:statuscode 409: conflict
@@ -1276,8 +1278,8 @@ In this version of the API, /attach, uses hijacking to transport stdin, stdout a
3.3 CORS Requests
-----------------
-To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
+To enable cross origin requests to the remote api add the flag "--api-enable-cors" when running docker in daemon mode.
.. code-block:: bash
- docker -d -H="192.168.1.9:4243" -api-enable-cors
+ docker -d -H="192.168.1.9:4243" --api-enable-cors
diff --git a/docs/sources/reference/api/docker_remote_api_v1.2.rst b/docs/sources/reference/api/docker_remote_api_v1.2.rst
index 1ae2db696f..80f76a3de9 100644
--- a/docs/sources/reference/api/docker_remote_api_v1.2.rst
+++ b/docs/sources/reference/api/docker_remote_api_v1.2.rst
@@ -1045,7 +1045,7 @@ In this version of the API, /attach, uses hijacking to transport stdin, stdout a
3.3 CORS Requests
-----------------
-To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
+To enable cross origin requests to the remote api add the flag "--api-enable-cors" when running docker in daemon mode.
- docker -d -H="tcp://192.168.1.9:4243" -api-enable-cors
+ docker -d -H="tcp://192.168.1.9:4243" --api-enable-cors
diff --git a/docs/sources/reference/api/docker_remote_api_v1.3.rst b/docs/sources/reference/api/docker_remote_api_v1.3.rst
index cb4c54642d..2b17a37a4d 100644
--- a/docs/sources/reference/api/docker_remote_api_v1.3.rst
+++ b/docs/sources/reference/api/docker_remote_api_v1.3.rst
@@ -1124,7 +1124,7 @@ In this version of the API, /attach, uses hijacking to transport stdin, stdout a
3.3 CORS Requests
-----------------
-To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
+To enable cross origin requests to the remote api add the flag "--api-enable-cors" when running docker in daemon mode.
- docker -d -H="192.168.1.9:4243" -api-enable-cors
+ docker -d -H="192.168.1.9:4243" --api-enable-cors
diff --git a/docs/sources/reference/api/docker_remote_api_v1.4.rst b/docs/sources/reference/api/docker_remote_api_v1.4.rst
index 39c8839653..ff5aaa7a74 100644
--- a/docs/sources/reference/api/docker_remote_api_v1.4.rst
+++ b/docs/sources/reference/api/docker_remote_api_v1.4.rst
@@ -1168,9 +1168,9 @@ In this version of the API, /attach, uses hijacking to transport stdin, stdout a
3.3 CORS Requests
-----------------
-To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
+To enable cross origin requests to the remote api add the flag "--api-enable-cors" when running docker in daemon mode.
.. code-block:: bash
- docker -d -H="192.168.1.9:4243" -api-enable-cors
+ docker -d -H="192.168.1.9:4243" --api-enable-cors
diff --git a/docs/sources/reference/api/docker_remote_api_v1.5.rst b/docs/sources/reference/api/docker_remote_api_v1.5.rst
index 0cdbaf747a..d4440e4423 100644
--- a/docs/sources/reference/api/docker_remote_api_v1.5.rst
+++ b/docs/sources/reference/api/docker_remote_api_v1.5.rst
@@ -1137,8 +1137,8 @@ In this version of the API, /attach, uses hijacking to transport stdin, stdout a
3.3 CORS Requests
-----------------
-To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
+To enable cross origin requests to the remote api add the flag "--api-enable-cors" when running docker in daemon mode.
.. code-block:: bash
- docker -d -H="192.168.1.9:4243" -api-enable-cors
+ docker -d -H="192.168.1.9:4243" --api-enable-cors
diff --git a/docs/sources/reference/api/docker_remote_api_v1.6.rst b/docs/sources/reference/api/docker_remote_api_v1.6.rst
index a9ddfb2c13..cfc37084b8 100644
--- a/docs/sources/reference/api/docker_remote_api_v1.6.rst
+++ b/docs/sources/reference/api/docker_remote_api_v1.6.rst
@@ -1274,9 +1274,9 @@ In this version of the API, /attach, uses hijacking to transport stdin, stdout a
3.3 CORS Requests
-----------------
-To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
+To enable cross origin requests to the remote api add the flag "--api-enable-cors" when running docker in daemon mode.
.. code-block:: bash
- docker -d -H="192.168.1.9:4243" -api-enable-cors
+ docker -d -H="192.168.1.9:4243" --api-enable-cors
diff --git a/docs/sources/reference/api/docker_remote_api_v1.7.rst b/docs/sources/reference/api/docker_remote_api_v1.7.rst
index cacd7ab6f7..1bafaddfc5 100644
--- a/docs/sources/reference/api/docker_remote_api_v1.7.rst
+++ b/docs/sources/reference/api/docker_remote_api_v1.7.rst
@@ -1254,9 +1254,9 @@ In this version of the API, /attach, uses hijacking to transport stdin, stdout a
3.3 CORS Requests
-----------------
-To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
+To enable cross origin requests to the remote api add the flag "--api-enable-cors" when running docker in daemon mode.
.. code-block:: bash
- docker -d -H="192.168.1.9:4243" -api-enable-cors
+ docker -d -H="192.168.1.9:4243" --api-enable-cors
diff --git a/docs/sources/reference/api/docker_remote_api_v1.8.rst b/docs/sources/reference/api/docker_remote_api_v1.8.rst
index b752f2f8a4..16492dde76 100644
--- a/docs/sources/reference/api/docker_remote_api_v1.8.rst
+++ b/docs/sources/reference/api/docker_remote_api_v1.8.rst
@@ -1287,8 +1287,8 @@ In this version of the API, /attach, uses hijacking to transport stdin, stdout a
3.3 CORS Requests
-----------------
-To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
+To enable cross origin requests to the remote api add the flag "--api-enable-cors" when running docker in daemon mode.
.. code-block:: bash
- docker -d -H="192.168.1.9:4243" -api-enable-cors
+ docker -d -H="192.168.1.9:4243" --api-enable-cors
diff --git a/docs/sources/reference/api/docker_remote_api_v1.9.rst b/docs/sources/reference/api/docker_remote_api_v1.9.rst
index 9430ff370d..27812457bb 100644
--- a/docs/sources/reference/api/docker_remote_api_v1.9.rst
+++ b/docs/sources/reference/api/docker_remote_api_v1.9.rst
@@ -1288,8 +1288,8 @@ In this version of the API, /attach, uses hijacking to transport stdin, stdout a
3.3 CORS Requests
-----------------
-To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
+To enable cross origin requests to the remote api add the flag "--api-enable-cors" when running docker in daemon mode.
.. code-block:: bash
- docker -d -H="192.168.1.9:4243" -api-enable-cors
+ docker -d -H="192.168.1.9:4243" --api-enable-cors
diff --git a/docs/sources/reference/api/remote_api_client_libraries.rst b/docs/sources/reference/api/remote_api_client_libraries.rst
index 9bab343bf5..4a445db36f 100644
--- a/docs/sources/reference/api/remote_api_client_libraries.rst
+++ b/docs/sources/reference/api/remote_api_client_libraries.rst
@@ -41,7 +41,13 @@ and we will add the libraries here.
+----------------------+----------------+--------------------------------------------+----------+
| Go | go-dockerclient| https://github.com/fsouza/go-dockerclient | Active |
+----------------------+----------------+--------------------------------------------+----------+
+| Go | dockerclient | https://github.com/samalba/dockerclient | Active |
++----------------------+----------------+--------------------------------------------+----------+
| PHP | Alvine | http://pear.alvine.io/ (alpha) | Active |
+----------------------+----------------+--------------------------------------------+----------+
| PHP | Docker-PHP | http://stage1.github.io/docker-php/ | Active |
+----------------------+----------------+--------------------------------------------+----------+
+| Perl | Net::Docker | https://metacpan.org/pod/Net::Docker | Active |
++----------------------+----------------+--------------------------------------------+----------+
+| Perl | Eixo::Docker | https://github.com/alambike/eixo-docker | Active |
++----------------------+----------------+--------------------------------------------+----------+
diff --git a/docs/sources/reference/builder.rst b/docs/sources/reference/builder.rst
index 9f7a816801..e8897d1b09 100644
--- a/docs/sources/reference/builder.rst
+++ b/docs/sources/reference/builder.rst
@@ -13,12 +13,10 @@ Dockerfile Reference
to create an image. Executing ``docker build`` will run your steps and
commit them along the way, giving you a final image.
-.. contents:: Table of Contents
-
.. _dockerfile_usage:
-1. Usage
-========
+Usage
+=====
To :ref:`build <cli_build>` an image from a source repository, create
a description file called ``Dockerfile`` at the root of your
@@ -49,7 +47,7 @@ to be created - so ``RUN cd /tmp`` will not have any effect on the next
instructions.
Whenever possible, Docker will re-use the intermediate images,
-accelerating ``docker build`` significantly (indicated by ``Using cache``:
+accelerating ``docker build`` significantly (indicated by ``Using cache``):
.. code-block:: bash
@@ -71,8 +69,8 @@ When you're done with your build, you're ready to look into
.. _dockerfile_format:
-2. Format
-=========
+Format
+======
Here is the format of the Dockerfile:
@@ -99,16 +97,14 @@ allows statements like:
.. _dockerfile_instructions:
-3. Instructions
-===============
Here is the set of instructions you can use in a ``Dockerfile`` for
building images.
.. _dockerfile_from:
-3.1 FROM
---------
+``FROM``
+========
``FROM <image>``
@@ -134,8 +130,8 @@ assumed. If the used tag does not exist, an error will be returned.
.. _dockerfile_maintainer:
-3.2 MAINTAINER
---------------
+``MAINTAINER``
+==============
``MAINTAINER <name>``
@@ -144,8 +140,8 @@ the generated images.
.. _dockerfile_run:
-3.3 RUN
--------
+``RUN``
+=======
RUN has 2 forms:
@@ -174,8 +170,8 @@ Known Issues (RUN)
.. _dockerfile_cmd:
-3.4 CMD
--------
+``CMD``
+=======
CMD has three forms:
@@ -192,9 +188,7 @@ omit the executable, in which case you must specify an ENTRYPOINT as
well.
When used in the shell or exec formats, the ``CMD`` instruction sets
-the command to be executed when running the image. This is
-functionally equivalent to running ``docker commit -run '{"Cmd":
-<command>}'`` outside the builder.
+the command to be executed when running the image.
If you use the *shell* form of the CMD, then the ``<command>`` will
execute in ``/bin/sh -c``:
@@ -229,20 +223,20 @@ override the default specified in CMD.
.. _dockerfile_expose:
-3.5 EXPOSE
-----------
+``EXPOSE``
+==========
``EXPOSE <port> [<port>...]``
-The ``EXPOSE`` instruction exposes ports for use within links. This is
-functionally equivalent to running ``docker commit -run '{"PortSpecs":
-["<port>", "<port2>"]}'`` outside the builder. Refer to
-:ref:`port_redirection` for detailed information.
+The ``EXPOSE`` instructions informs Docker that the container will listen
+on the specified network ports at runtime. Docker uses this information
+to interconnect containers using links (see :ref:`links <working_with_links_names>`),
+and to setup port redirection on the host system (see :ref:`port_redirection`).
.. _dockerfile_env:
-3.6 ENV
--------
+``ENV``
+=======
``ENV <key> <value>``
@@ -262,8 +256,8 @@ from the resulting image. You can view the values using ``docker inspect``, and
.. _dockerfile_add:
-3.7 ADD
--------
+``ADD``
+=======
``ADD <src> <dest>``
@@ -329,8 +323,8 @@ The copy obeys the following rules:
.. _dockerfile_entrypoint:
-3.8 ENTRYPOINT
---------------
+``ENTRYPOINT``
+==============
ENTRYPOINT has two forms:
@@ -378,8 +372,8 @@ this optional but default, you could use a CMD:
.. _dockerfile_volume:
-3.9 VOLUME
-----------
+``VOLUME``
+==========
``VOLUME ["/data"]``
@@ -389,8 +383,8 @@ and mounting instructions via docker client, refer to :ref:`volume_def` document
.. _dockerfile_user:
-3.10 USER
----------
+``USER``
+========
``USER daemon``
@@ -399,18 +393,27 @@ the image.
.. _dockerfile_workdir:
-3.11 WORKDIR
-------------
+``WORKDIR``
+===========
``WORKDIR /path/to/workdir``
The ``WORKDIR`` instruction sets the working directory for the ``RUN``, ``CMD`` and
``ENTRYPOINT`` Dockerfile commands that follow it.
-It can be used multiple times in the one Dockerfile.
+It can be used multiple times in the one Dockerfile. If a relative path is
+provided, it will be relative to the path of the previous ``WORKDIR``
+instruction. For example:
+
+ WORKDIR /a
+ WORKDIR b
+ WORKDIR c
+ RUN pwd
+
+The output of the final ``pwd`` command in this Dockerfile would be ``/a/b/c``.
-3.11 ONBUILD
-------------
+``ONBUILD``
+===========
``ONBUILD [INSTRUCTION]``
@@ -471,7 +474,7 @@ For example you might add something like this:
.. _dockerfile_examples:
-4. Dockerfile Examples
+Dockerfile Examples
======================
.. code-block:: bash
@@ -481,7 +484,7 @@ For example you might add something like this:
# VERSION 0.0.1
FROM ubuntu
- MAINTAINER Guillaume J. Charmes <guillaume@dotcloud.com>
+ MAINTAINER Guillaume J. Charmes <guillaume@docker.com>
# make sure the package repository is up to date
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
diff --git a/docs/sources/reference/commandline/cli.rst b/docs/sources/reference/commandline/cli.rst
index 2e49cd5ca5..c0df5f8175 100644
--- a/docs/sources/reference/commandline/cli.rst
+++ b/docs/sources/reference/commandline/cli.rst
@@ -52,7 +52,7 @@ Sometimes this can use a more complex value string, as for ``-v``::
Strings and Integers
~~~~~~~~~~~~~~~~~~~~
-Options like ``-name=""`` expect a string, and they can only be
+Options like ``--name=""`` expect a string, and they can only be
specified once. Options like ``-c=0`` expect an integer, and they can
only be specified once.
@@ -74,36 +74,45 @@ Commands
-G, --group="docker": Group to assign the unix socket specified by -H when running in daemon mode; use '' (the empty string) to disable setting of a group
--api-enable-cors=false: Enable CORS headers in the remote API
-b, --bridge="": Attach containers to a pre-existing network bridge; use 'none' to disable container networking
- --bip="": Use this CIDR notation address for the network bridge's IP, not compatible with -b
+ -bip="": Use this CIDR notation address for the network bridge's IP, not compatible with -b
-d, --daemon=false: Enable daemon mode
--dns=[]: Force docker to use specific DNS servers
+ --dns-search=[]: Force Docker to use specific DNS search domains
-g, --graph="/var/lib/docker": Path to use as the root of the docker runtime
--icc=true: Enable inter-container communication
--ip="0.0.0.0": Default IP address to use when binding container ports
- --iptables=true: Disable docker's addition of iptables rules
+ --ip-forward=true: Enable net.ipv4.ip_forward
+ --iptables=true: Enable Docker's addition of iptables rules
-p, --pidfile="/var/run/docker.pid": Path to use for daemon PID file
-r, --restart=true: Restart previously running containers
-s, --storage-driver="": Force the docker runtime to use a specific storage driver
-e, --exec-driver="native": Force the docker runtime to use a specific exec driver
-v, --version=false: Print version information and quit
+ --tls=false: Use TLS; implied by tls-verify flags
+ --tlscacert="~/.docker/ca.pem": Trust only remotes providing a certificate signed by the CA given here
+ --tlscert="~/.docker/cert.pem": Path to TLS certificate file
+ --tlskey="~/.docker/key.pem": Path to TLS key file
+ --tlsverify=false: Use TLS and verify the remote (daemon: verify client, client: verify daemon)
--mtu=0: Set the containers network MTU; if no value is provided: default to the default route MTU or 1500 if no default route is available
-The Docker daemon is the persistent process that manages containers. Docker uses the same binary for both the
+The Docker daemon is the persistent process that manages containers. Docker uses the same binary for both the
daemon and client. To run the daemon you provide the ``-d`` flag.
To force Docker to use devicemapper as the storage driver, use ``docker -d -s devicemapper``.
-To set the DNS server for all Docker containers, use ``docker -d -dns 8.8.8.8``.
+To set the DNS server for all Docker containers, use ``docker -d --dns 8.8.8.8``.
+
+To set the DNS search domain for all Docker containers, use ``docker -d --dns-search example.com``.
To run the daemon with debug output, use ``docker -d -D``.
To use lxc as the execution driver, use ``docker -d -e lxc``.
The docker client will also honor the ``DOCKER_HOST`` environment variable to set
-the ``-H`` flag for the client.
+the ``-H`` flag for the client.
::
-
+
docker -H tcp://0.0.0.0:4243 ps
# or
export DOCKER_HOST="tcp://0.0.0.0:4243"
@@ -141,7 +150,7 @@ TMPDIR and the data directory can be set like this:
You can detach from the container again (and leave it running) with
``CTRL-c`` (for a quiet exit) or ``CTRL-\`` to get a stacktrace of
-the Docker client when it quits. When you detach from the container's
+the Docker client when it quits. When you detach from the container's
process the exit code will be returned to the client.
To stop a container, use ``docker stop``.
@@ -202,12 +211,16 @@ Examples:
--no-cache: Do not use the cache when building the image.
--rm=true: Remove intermediate containers after a successful build
-The files at ``PATH`` or ``URL`` are called the "context" of the build. The
-build process may refer to any of the files in the context, for example when
-using an :ref:`ADD <dockerfile_add>` instruction. When a single ``Dockerfile``
-is given as ``URL``, then no context is set. When a Git repository is set as
-``URL``, then the repository is used as the context. Git repositories are
-cloned with their submodules (`git clone --recursive`).
+The files at ``PATH`` or ``URL`` are called the "context" of the build.
+The build process may refer to any of the files in the context, for example when
+using an :ref:`ADD <dockerfile_add>` instruction.
+When a single ``Dockerfile`` is given as ``URL``, then no context is set.
+
+When a Git repository is set as ``URL``, then the repository is used as the context.
+The Git repository is cloned with its submodules (`git clone --recursive`).
+A fresh git clone occurs in a temporary directory on your local host, and then this
+is sent to the Docker daemon as the context.
+This way, your local user credentials and vpn's etc can be used to access private repositories
.. _cli_build_examples:
@@ -303,8 +316,6 @@ by using the ``git://`` schema.
-m, --message="": Commit message
-a, --author="": Author (eg. "John Hannibal Smith <hannibal@a-team.com>"
- --run="": Configuration to be applied when the image is launched with `docker run`.
- (ex: -run='{"Cmd": ["cat", "/world"], "PortSpecs": ["22"]}')
.. _cli_commit_examples:
@@ -315,74 +326,14 @@ Commit an existing container
$ sudo docker ps
ID IMAGE COMMAND CREATED STATUS PORTS
- c3f279d17e0a ubuntu:12.04 /bin/bash 7 days ago Up 25 hours
- 197387f1b436 ubuntu:12.04 /bin/bash 7 days ago Up 25 hours
+ c3f279d17e0a ubuntu:12.04 /bin/bash 7 days ago Up 25 hours
+ 197387f1b436 ubuntu:12.04 /bin/bash 7 days ago Up 25 hours
$ docker commit c3f279d17e0a SvenDowideit/testimage:version3
f5283438590d
$ docker images | head
REPOSITORY TAG ID CREATED VIRTUAL SIZE
SvenDowideit/testimage version3 f5283438590d 16 seconds ago 335.7 MB
-
-Change the command that a container runs
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Sometimes you have an application container running just a service and you need
-to make a quick change and then change it back.
-
-In this example, we run a container with ``ls`` and then change the image to
-run ``ls /etc``.
-
-.. code-block:: bash
-
- $ docker run -t -name test ubuntu ls
- bin boot dev etc home lib lib64 media mnt opt proc root run sbin selinux srv sys tmp usr var
- $ docker commit -run='{"Cmd": ["ls","/etc"]}' test test2
- 933d16de9e70005304c1717b5c6f2f39d6fd50752834c6f34a155c70790011eb
- $ docker run -t test2
- adduser.conf gshadow login.defs rc0.d
- alternatives gshadow- logrotate.d rc1.d
- apt host.conf lsb-base rc2.d
- ...
-
-Full -run example
-.................
-
-The ``--run`` JSON hash changes the ``Config`` section when running ``docker inspect CONTAINERID``
-or ``config`` when running ``docker inspect IMAGEID``.
-(Multiline is okay within a single quote ``'``)
-
-.. code-block:: bash
-
- $ sudo docker commit -run='
- {
- "Entrypoint" : null,
- "Privileged" : false,
- "User" : "",
- "VolumesFrom" : "",
- "Cmd" : ["cat", "-e", "/etc/resolv.conf"],
- "Dns" : ["8.8.8.8", "8.8.4.4"],
- "MemorySwap" : 0,
- "AttachStdin" : false,
- "AttachStderr" : false,
- "CpuShares" : 0,
- "OpenStdin" : false,
- "Volumes" : null,
- "Hostname" : "122612f45831",
- "PortSpecs" : ["22", "80", "443"],
- "Image" : "b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc",
- "Tty" : false,
- "Env" : [
- "HOME=/",
- "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
- ],
- "StdinOnce" : false,
- "Domainname" : "",
- "WorkingDir" : "/",
- "NetworkDisabled" : false,
- "Memory" : 0,
- "AttachStdout" : false
- }' $CONTAINER_ID
.. _cli_cp:
@@ -486,16 +437,16 @@ Show events in the past from a specified time
.. code-block:: bash
- $ sudo docker events -since 1378216169
+ $ sudo docker events --since 1378216169
[2013-09-03 15:49:29 +0200 CEST] 4386fb97867d: (from 12de384bfb10) die
[2013-09-03 15:49:29 +0200 CEST] 4386fb97867d: (from 12de384bfb10) stop
- $ sudo docker events -since '2013-09-03'
+ $ sudo docker events --since '2013-09-03'
[2013-09-03 15:49:26 +0200 CEST] 4386fb97867d: (from 12de384bfb10) start
[2013-09-03 15:49:29 +0200 CEST] 4386fb97867d: (from 12de384bfb10) die
[2013-09-03 15:49:29 +0200 CEST] 4386fb97867d: (from 12de384bfb10) stop
- $ sudo docker events -since '2013-09-03 15:49:29 +0200 CEST'
+ $ sudo docker events --since '2013-09-03 15:49:29 +0200 CEST'
[2013-09-03 15:49:29 +0200 CEST] 4386fb97867d: (from 12de384bfb10) die
[2013-09-03 15:49:29 +0200 CEST] 4386fb97867d: (from 12de384bfb10) stop
@@ -535,35 +486,14 @@ To see how the ``docker:latest`` image was built:
.. code-block:: bash
$ docker history docker
- ID CREATED CREATED BY
- docker:latest 19 hours ago /bin/sh -c #(nop) ADD . in /go/src/github.com/dotcloud/docker
- cf5f2467662d 2 weeks ago /bin/sh -c #(nop) ENTRYPOINT ["hack/dind"]
- 3538fbe372bf 2 weeks ago /bin/sh -c #(nop) WORKDIR /go/src/github.com/dotcloud/docker
- 7450f65072e5 2 weeks ago /bin/sh -c #(nop) VOLUME /var/lib/docker
- b79d62b97328 2 weeks ago /bin/sh -c apt-get install -y -q lxc
- 36714852a550 2 weeks ago /bin/sh -c apt-get install -y -q iptables
- 8c4c706df1d6 2 weeks ago /bin/sh -c /bin/echo -e '[default]\naccess_key=$AWS_ACCESS_KEY\nsecret_key=$AWS_SECRET_KEYn' > /.s3cfg
- b89989433c48 2 weeks ago /bin/sh -c pip install python-magic
- a23e640d85b5 2 weeks ago /bin/sh -c pip install s3cmd
- 41f54fec7e79 2 weeks ago /bin/sh -c apt-get install -y -q python-pip
- d9bc04add907 2 weeks ago /bin/sh -c apt-get install -y -q reprepro dpkg-sig
- e74f4760fa70 2 weeks ago /bin/sh -c gem install --no-rdoc --no-ri fpm
- 1e43224726eb 2 weeks ago /bin/sh -c apt-get install -y -q ruby1.9.3 rubygems libffi-dev
- 460953ae9d7f 2 weeks ago /bin/sh -c #(nop) ENV GOPATH=/go:/go/src/github.com/dotcloud/docker/vendor
- 8b63eb1d666b 2 weeks ago /bin/sh -c #(nop) ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/goroot/bin
- 3087f3bcedf2 2 weeks ago /bin/sh -c #(nop) ENV GOROOT=/goroot
- 635840d198e5 2 weeks ago /bin/sh -c cd /goroot/src && ./make.bash
- 439f4a0592ba 2 weeks ago /bin/sh -c curl -s https://go.googlecode.com/files/go1.1.2.src.tar.gz | tar -v -C / -xz && mv /go /goroot
- 13967ed36e93 2 weeks ago /bin/sh -c #(nop) ENV CGO_ENABLED=0
- bf7424458437 2 weeks ago /bin/sh -c apt-get install -y -q build-essential
- a89ec997c3bf 2 weeks ago /bin/sh -c apt-get install -y -q mercurial
- b9f165c6e749 2 weeks ago /bin/sh -c apt-get install -y -q git
- 17a64374afa7 2 weeks ago /bin/sh -c apt-get install -y -q curl
- d5e85dc5b1d8 2 weeks ago /bin/sh -c apt-get update
- 13e642467c11 2 weeks ago /bin/sh -c echo 'deb http://archive.ubuntu.com/ubuntu precise main universe' > /etc/apt/sources.list
- ae6dde92a94e 2 weeks ago /bin/sh -c #(nop) MAINTAINER Solomon Hykes <solomon@dotcloud.com>
- ubuntu:12.04 6 months ago
-
+ IMAGE CREATED CREATED BY SIZE
+ 3e23a5875458790b7a806f95f7ec0d0b2a5c1659bfc899c89f939f6d5b8f7094 8 days ago /bin/sh -c #(nop) ENV LC_ALL=C.UTF-8 0 B
+ 8578938dd17054dce7993d21de79e96a037400e8d28e15e7290fea4f65128a36 8 days ago /bin/sh -c dpkg-reconfigure locales && locale-gen C.UTF-8 && /usr/sbin/update-locale LANG=C.UTF-8 1.245 MB
+ be51b77efb42f67a5e96437b3e102f81e0a1399038f77bf28cea0ed23a65cf60 8 days ago /bin/sh -c apt-get update && apt-get install -y git libxml2-dev python build-essential make gcc python-dev locales python-pip 338.3 MB
+ 4b137612be55ca69776c7f30c2d2dd0aa2e7d72059820abf3e25b629f887a084 6 weeks ago /bin/sh -c #(nop) ADD jessie.tar.xz in / 121 MB
+ 750d58736b4b6cc0f9a9abe8f258cef269e3e9dceced1146503522be9f985ada 6 weeks ago /bin/sh -c #(nop) MAINTAINER Tianon Gravi <admwiggin@gmail.com> - mkimage-debootstrap.sh -t jessie.tar.xz jessie http://http.debian.net/debian 0 B
+ 511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158 9 months ago 0 B
+
.. _cli_images:
``images``
@@ -575,11 +505,16 @@ To see how the ``docker:latest`` image was built:
List images
- -a, --all=false: Show all images (by default filter out the intermediate images used to build)
+ -a, --all=false: Show all images (by default filter out the intermediate image layers)
--no-trunc=false: Don't truncate output
-q, --quiet=false: Only show numeric IDs
- --tree=false: Output graph in tree format
- --viz=false: Output graph in graphviz format
+
+The default ``docker images`` will show all top level images, their repository
+and tags, and their virtual size.
+
+Docker images have intermediate layers that increase reuseability, decrease
+disk usage, and speed up ``docker build`` by allowing each step to be cached.
+These intermediate layers are not shown by default.
Listing the most recently created images
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -615,46 +550,6 @@ Listing the full length image IDs
tryout latest 2629d1fa0b81b222fca63371ca16cbf6a0772d07759ff80e8d1369b926940074 23 hours ago 131.5 MB
<none> <none> 5ed6274db6ceb2397844896966ea239290555e74ef307030ebb01ff91b1914df 24 hours ago 1.089 GB
-Displaying images visually
-~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-.. code-block:: bash
-
- $ sudo docker images --viz | dot -Tpng -o docker.png
-
-.. image:: docker_images.gif
- :alt: Example inheritance graph of Docker images.
-
-
-Displaying image hierarchy
-~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-.. code-block:: bash
-
- $ sudo docker images --tree
-
- ├─8dbd9e392a96 Size: 131.5 MB (virtual 131.5 MB) Tags: ubuntu:12.04,ubuntu:latest,ubuntu:precise
- └─27cf78414709 Size: 180.1 MB (virtual 180.1 MB)
- └─b750fe79269d Size: 24.65 kB (virtual 180.1 MB) Tags: ubuntu:12.10,ubuntu:quantal
- ├─f98de3b610d5 Size: 12.29 kB (virtual 180.1 MB)
- │ └─7da80deb7dbf Size: 16.38 kB (virtual 180.1 MB)
- │ └─65ed2fee0a34 Size: 20.66 kB (virtual 180.2 MB)
- │ └─a2b9ea53dddc Size: 819.7 MB (virtual 999.8 MB)
- │ └─a29b932eaba8 Size: 28.67 kB (virtual 999.9 MB)
- │ └─e270a44f124d Size: 12.29 kB (virtual 999.9 MB) Tags: progrium/buildstep:latest
- └─17e74ac162d8 Size: 53.93 kB (virtual 180.2 MB)
- └─339a3f56b760 Size: 24.65 kB (virtual 180.2 MB)
- └─904fcc40e34d Size: 96.7 MB (virtual 276.9 MB)
- └─b1b0235328dd Size: 363.3 MB (virtual 640.2 MB)
- └─7cb05d1acb3b Size: 20.48 kB (virtual 640.2 MB)
- └─47bf6f34832d Size: 20.48 kB (virtual 640.2 MB)
- └─f165104e82ed Size: 12.29 kB (virtual 640.2 MB)
- └─d9cf85a47b7e Size: 1.911 MB (virtual 642.2 MB)
- └─3ee562df86ca Size: 17.07 kB (virtual 642.2 MB)
- └─b05fc2d00e4a Size: 24.96 kB (virtual 642.2 MB)
- └─c96a99614930 Size: 12.29 kB (virtual 642.2 MB)
- └─a6a357a48c49 Size: 12.29 kB (virtual 642.2 MB) Tags: ndj/mongodb:latest
-
.. _cli_import:
``import``
@@ -664,7 +559,7 @@ Displaying image hierarchy
Usage: docker import URL|- [REPOSITORY[:TAG]]
- Create an empty filesystem image and import the contents of the tarball
+ Create an empty filesystem image and import the contents of the tarball
(.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz) into it, then optionally tag it.
At this time, the URL must start with ``http`` and point to a single
@@ -731,34 +626,6 @@ preserved.
WARNING: No swap limit support
-.. _cli_insert:
-
-``insert``
-----------
-
-::
-
- Usage: docker insert IMAGE URL PATH
-
- Insert a file from URL in the IMAGE at PATH
-
-Use the specified ``IMAGE`` as the parent for a new image which adds a
-:ref:`layer <layer_def>` containing the new file. The ``insert`` command does
-not modify the original image, and the new image has the contents of the parent
-image, plus the new file.
-
-
-Examples
-~~~~~~~~
-
-Insert file from GitHub
-.......................
-
-.. code-block:: bash
-
- $ sudo docker insert 8283e18b24bc https://raw.github.com/metalivedev/django/master/postinstall /tmp/postinstall.sh
- 06fd35556d7b
-
.. _cli_inspect:
``inspect``
@@ -799,7 +666,7 @@ text output:
.. code-block:: bash
- $ sudo docker inspect -format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' $INSTANCE_ID
+ $ sudo docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' $INSTANCE_ID
Find a Specific Port Mapping
............................
@@ -814,7 +681,7 @@ we ask for the ``HostPort`` field to get the public address.
.. code-block:: bash
- $ sudo docker inspect -format='{{(index (index .NetworkSettings.Ports "8787/tcp") 0).HostPort}}' $INSTANCE_ID
+ $ sudo docker inspect --format='{{(index (index .NetworkSettings.Ports "8787/tcp") 0).HostPort}}' $INSTANCE_ID
Get config
..........
@@ -826,7 +693,7 @@ to convert config object into JSON
.. code-block:: bash
- $ sudo docker inspect -format='{{json .config}}' $INSTANCE_ID
+ $ sudo docker inspect --format='{{json .config}}' $INSTANCE_ID
.. _cli_kill:
@@ -859,10 +726,32 @@ Known Issues (kill)
::
- Usage: docker load < repository.tar
+ Usage: docker load
+
+ Load an image from a tar archive on STDIN
+
+ -i, --input="": Read from a tar archive file, instead of STDIN
+
+Loads a tarred repository from a file or the standard input stream.
+Restores both images and tags.
+
+.. code-block:: bash
+
+ $ sudo docker images
+ REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
+ $ sudo docker load < busybox.tar
+ $ sudo docker images
+ REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
+ busybox latest 769b9341d937 7 weeks ago 2.489 MB
+ $ sudo docker load --input fedora.tar
+ $ sudo docker images
+ REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
+ busybox latest 769b9341d937 7 weeks ago 2.489 MB
+ fedora rawhide 0d20aec6529d 7 weeks ago 387 MB
+ fedora 20 58394af37342 7 weeks ago 385.5 MB
+ fedora heisenbug 58394af37342 7 weeks ago 385.5 MB
+ fedora latest 58394af37342 7 weeks ago 385.5 MB
- Loads a tarred repository from the standard input stream.
- Restores both images and tags.
.. _cli_login:
@@ -933,8 +822,14 @@ new output from the container's stdout and stderr.
List containers
-a, --all=false: Show all containers. Only running containers are shown by default.
+ --before="": Show only container created before Id or Name, include non-running ones.
+ -l, --latest=false: Show only the latest created container, include non-running ones.
+ -n=-1: Show n last created containers, include non-running ones.
--no-trunc=false: Don't truncate output
-q, --quiet=false: Only display numeric IDs
+ -s, --size=false: Display sizes, not to be used with -q
+ --since="": Show only containers created since Id or Name, include non-running ones.
+
Running ``docker ps`` showing 2 linked containers.
@@ -942,7 +837,7 @@ Running ``docker ps`` showing 2 linked containers.
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- 4c01db0b339c ubuntu:12.04 bash 17 seconds ago Up 16 seconds webapp
+ 4c01db0b339c ubuntu:12.04 bash 17 seconds ago Up 16 seconds webapp
d7886598dbe2 crosbymichael/redis:latest /redis-server --dir 33 minutes ago Up 33 minutes 6379/tcp redis,webapp/db
fd2645e2e2b5 busybox:latest top 10 days ago Ghost insane_ptolemy
@@ -957,7 +852,7 @@ The last container is marked as a ``Ghost`` container. It is a container that wa
::
- Usage: docker pull NAME
+ Usage: docker pull NAME[:TAG]
Pull an image or a repository from the registry
@@ -969,7 +864,7 @@ The last container is marked as a ``Ghost`` container. It is a container that wa
::
- Usage: docker push NAME
+ Usage: docker push NAME[:TAG]
Push an image or a repository to the registry
@@ -985,6 +880,8 @@ The last container is marked as a ``Ghost`` container. It is a container that wa
Restart a running container
+ -t, --time=10: Number of seconds to try to stop for before killing the container. Once killed it will then be restarted. Default=10
+
.. _cli_rm:
``rm``
@@ -997,6 +894,7 @@ The last container is marked as a ``Ghost`` container. It is a container that wa
Remove one or more containers
-l, --link="": Remove the link instead of the actual container
-f, --force=false: Force removal of running container
+ -v, --volumes=false: Remove the volumes associated to the container
Known Issues (rm)
~~~~~~~~~~~~~~~~~
@@ -1047,7 +945,8 @@ containers will not be deleted.
Remove one or more images
-f, --force=false: Force
-
+ --no-prune=false: Do not delete untagged parents
+
Removing tagged images
~~~~~~~~~~~~~~~~~~~~~~
@@ -1096,7 +995,8 @@ image is removed.
--cidfile="": Write the container ID to the file
-d, --detach=false: Detached mode: Run container in the background, print new container id
-e, --env=[]: Set environment variables
- -h, --host="": Container host name
+ --env-file="": Read in a line delimited file of ENV variables
+ -h, --hostname="": Container host name
-i, --interactive=false: Keep stdin open even if not attached
--privileged=false: Give extended privileges to this container
-m, --memory="": Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
@@ -1106,11 +1006,12 @@ image is removed.
-t, --tty=false: Allocate a pseudo-tty
-u, --user="": Username or UID
--dns=[]: Set custom dns servers for the container
+ --dns-search=[]: Set custom DNS search domains for the container
-v, --volume=[]: Create a bind mount to a directory or file with: [host-path]:[container-path]:[rw|ro]. If a directory "container-path" is missing, then docker creates a new volume.
--volumes-from="": Mount all volumes from the given container(s)
--entrypoint="": Overwrite the default entrypoint set by the image
-w, --workdir="": Working directory inside the container
- --lxc-conf=[]: Add custom lxc options -lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
+ --lxc-conf=[]: (lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
--sig-proxy=true: Proxify all received signal to the process (even in non-tty mode)
--expose=[]: Expose a port from the container without publishing it to your host
--link="": Add link to another container (name:alias)
@@ -1126,12 +1027,12 @@ Once the container is stopped it still exists and can be started back up. See `
The ``docker run`` command can be used in combination with ``docker commit`` to
:ref:`change the command that a container runs <cli_commit_examples>`.
-See :ref:`port_redirection` for more detailed information about the ``--expose``,
-``-p``, ``-P`` and ``--link`` parameters, and :ref:`working_with_links_names` for
+See :ref:`port_redirection` for more detailed information about the ``--expose``,
+``-p``, ``-P`` and ``--link`` parameters, and :ref:`working_with_links_names` for
specific examples using ``--link``.
-Known Issues (run -volumes-from)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Known Issues (run --volumes-from)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* :issue:`2702`: "lxc-start: Permission denied - failed to mount"
could indicate a permissions problem with AppArmor. Please see the
@@ -1158,7 +1059,7 @@ error. Docker will close this file when ``docker run`` exits.
This will *not* work, because by default, most potentially dangerous
kernel capabilities are dropped; including ``cap_sys_admin`` (which is
-required to mount filesystems). However, the ``-privileged`` flag will
+required to mount filesystems). However, the ``--privileged`` flag will
allow it to run:
.. code-block:: bash
@@ -1170,7 +1071,7 @@ allow it to run:
none 1.9G 0 1.9G 0% /mnt
-The ``-privileged`` flag gives *all* capabilities to the container,
+The ``--privileged`` flag gives *all* capabilities to the container,
and it also lifts all the limitations enforced by the ``device``
cgroup controller. In other words, the container can then do almost
everything that the host can do. This flag exists to allow special
@@ -1207,8 +1108,8 @@ starting your container.
$ sudo docker run -t -i -v /var/run/docker.sock:/var/run/docker.sock -v ./static-docker:/usr/bin/docker busybox sh
-By bind-mounting the docker unix socket and statically linked docker binary
-(such as that provided by https://get.docker.io), you give the container
+By bind-mounting the docker unix socket and statically linked docker binary
+(such as that provided by https://get.docker.io), you give the container
the full access to create and manipulate the host's docker daemon.
.. code-block:: bash
@@ -1229,6 +1130,54 @@ explains in detail how to manipulate ports in Docker.
.. code-block:: bash
+ $ sudo docker run -e MYVAR1 --env MYVAR2=foo --env-file ./env.list ubuntu bash
+
+This sets environmental variables in the container. For illustration all three
+flags are shown here. Where ``-e``, ``--env`` take an environment variable and
+value, or if no "=" is provided, then that variable's current value is passed
+through (i.e. $MYVAR1 from the host is set to $MYVAR1 in the container). All
+three flags, ``-e``, ``--env`` and ``--env-file`` can be repeated.
+
+Regardless of the order of these three flags, the ``--env-file`` are processed
+first, and then ``-e``/``--env`` flags. This way, the ``-e`` or ``--env`` will
+override variables as needed.
+
+.. code-block:: bash
+
+ $ cat ./env.list
+ TEST_FOO=BAR
+ $ sudo docker run --env TEST_FOO="This is a test" --env-file ./env.list busybox env | grep TEST_FOO
+ TEST_FOO=This is a test
+
+The ``--env-file`` flag takes a filename as an argument and expects each line
+to be in the VAR=VAL format, mimicking the argument passed to ``--env``.
+Comment lines need only be prefixed with ``#``
+
+An example of a file passed with ``--env-file``
+
+.. code-block:: bash
+
+ $ cat ./env.list
+ TEST_FOO=BAR
+
+ # this is a comment
+ TEST_APP_DEST_HOST=10.10.0.127
+ TEST_APP_DEST_PORT=8888
+
+ # pass through this variable from the caller
+ TEST_PASSTHROUGH
+ $ sudo TEST_PASSTHROUGH=howdy docker run --env-file ./env.list busybox env
+ HOME=/
+ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ HOSTNAME=5198e0745561
+ TEST_FOO=BAR
+ TEST_APP_DEST_HOST=10.10.0.127
+ TEST_APP_DEST_PORT=8888
+ TEST_PASSTHROUGH=howdy
+
+
+.. code-block:: bash
+
$ sudo docker run --name console -t -i ubuntu bash
This will create and run a new container with the container name
@@ -1255,6 +1204,35 @@ ID may be optionally suffixed with ``:ro`` or ``:rw`` to mount the volumes in
read-only or read-write mode, respectively. By default, the volumes are mounted
in the same mode (read write or read only) as the reference container.
+The ``-a`` flag tells ``docker run`` to bind to the container's stdin, stdout
+or stderr. This makes it possible to manipulate the output and input as needed.
+
+.. code-block:: bash
+
+ $ sudo echo "test" | docker run -i -a stdin ubuntu cat -
+
+This pipes data into a container and prints the container's ID by attaching
+only to the container's stdin.
+
+.. code-block:: bash
+
+ $ sudo docker run -a stderr ubuntu echo test
+
+This isn't going to print anything unless there's an error because we've only
+attached to the stderr of the container. The container's logs still store
+what's been written to stderr and stdout.
+
+.. code-block:: bash
+
+ $ sudo cat somefile | docker run -i -a stdin mybuilder dobuild
+
+This is how piping a file into a container could be done for a build.
+The container's ID will be printed after the build is done and the build logs
+could be retrieved using ``docker logs``. This is useful if you need to pipe
+a file or something else into a container and retrieve the container's ID once
+the container has finished running.
+
+
A complete example
..................
@@ -1263,7 +1241,7 @@ A complete example
$ sudo docker run -d --name static static-web-files sh
$ sudo docker run -d --expose=8098 --name riak riakserver
$ sudo docker run -d -m 100m -e DEVELOPMENT=1 -e BRANCH=example-code -v $(pwd):/app/bin:ro --name app appserver
- $ sudo docker run -d -p 1443:443 --dns=dns.dev.org -v /var/log/httpd --volumes-from static --link riak --link app -h www.sven.dev.org --name web webserver
+ $ sudo docker run -d -p 1443:443 --dns=dns.dev.org --dns-search=dev.org -v /var/log/httpd --volumes-from static --link riak --link app -h www.sven.dev.org --name web webserver
$ sudo docker run -t -i --rm --volumes-from web -w /var/log/httpd busybox tail -f access.log
This example shows 5 containers that might be set up to test a web application change:
@@ -1271,8 +1249,8 @@ This example shows 5 containers that might be set up to test a web application c
1. Start a pre-prepared volume image ``static-web-files`` (in the background) that has CSS, image and static HTML in it, (with a ``VOLUME`` instruction in the ``Dockerfile`` to allow the web server to use those files);
2. Start a pre-prepared ``riakserver`` image, give the container name ``riak`` and expose port ``8098`` to any containers that link to it;
3. Start the ``appserver`` image, restricting its memory usage to 100MB, setting two environment variables ``DEVELOPMENT`` and ``BRANCH`` and bind-mounting the current directory (``$(pwd)``) in the container in read-only mode as ``/app/bin``;
-4. Start the ``webserver``, mapping port ``443`` in the container to port ``1443`` on the Docker server, setting the DNS server to ``dns.dev.org``, creating a volume to put the log files into (so we can access it from another container), then importing the files from the volume exposed by the ``static`` container, and linking to all exposed ports from ``riak`` and ``app``. Lastly, we set the hostname to ``web.sven.dev.org`` so its consistent with the pre-generated SSL certificate;
-5. Finally, we create a container that runs ``tail -f access.log`` using the logs volume from the ``web`` container, setting the workdir to ``/var/log/httpd``. The ``-rm`` option means that when the container exits, the container's layer is removed.
+4. Start the ``webserver``, mapping port ``443`` in the container to port ``1443`` on the Docker server, setting the DNS server to ``dns.dev.org`` and DNS search domain to ``dev.org``, creating a volume to put the log files into (so we can access it from another container), then importing the files from the volume exposed by the ``static`` container, and linking to all exposed ports from ``riak`` and ``app``. Lastly, we set the hostname to ``web.sven.dev.org`` so its consistent with the pre-generated SSL certificate;
+5. Finally, we create a container that runs ``tail -f access.log`` using the logs volume from the ``web`` container, setting the workdir to ``/var/log/httpd``. The ``--rm`` option means that when the container exits, the container's layer is removed.
.. _cli_save:
@@ -1282,10 +1260,27 @@ This example shows 5 containers that might be set up to test a web application c
::
- Usage: docker save image > repository.tar
+ Usage: docker save IMAGE
+
+ Save an image to a tar archive (streamed to stdout by default)
+
+ -o, --output="": Write to an file, instead of STDOUT
+
+
+Produces a tarred repository to the standard output stream.
+Contains all parent layers, and all tags + versions, or specified repo:tag.
+
+.. code-block:: bash
+
+ $ sudo docker save busybox > busybox.tar
+ $ ls -sh b.tar
+ 2.7M b.tar
+ $ sudo docker save --output busybox.tar busybox
+ $ ls -sh b.tar
+ 2.7M b.tar
+ $ sudo docker save -o fedora-all.tar fedora
+ $ sudo docker save -o fedora-latest.tar fedora:latest
- Streams a tarred repository to the standard output stream.
- Contains all parent layers, and all tags + versions.
.. _cli_search:
diff --git a/docs/sources/reference/run.rst b/docs/sources/reference/run.rst
index d8de280671..d2fe449c22 100644
--- a/docs/sources/reference/run.rst
+++ b/docs/sources/reference/run.rst
@@ -80,7 +80,7 @@ through network connections or shared volumes because the container is
no longer listening to the commandline where you executed ``docker
run``. You can reattach to a detached container with ``docker``
:ref:`cli_attach`. If you choose to run a container in the detached
-mode, then you cannot use the ``-rm`` option.
+mode, then you cannot use the ``--rm`` option.
Foreground
..........
@@ -92,10 +92,10 @@ error. It can even pretend to be a TTY (this is what most commandline
executables expect) and pass along signals. All of that is
configurable::
- -a=[] : Attach to ``stdin``, ``stdout`` and/or ``stderr``
- -t=false : Allocate a pseudo-tty
- -sig-proxy=true: Proxify all received signal to the process (even in non-tty mode)
- -i=false : Keep STDIN open even if not attached
+ -a=[] : Attach to ``stdin``, ``stdout`` and/or ``stderr``
+ -t=false : Allocate a pseudo-tty
+ --sig-proxy=true: Proxify all received signal to the process (even in non-tty mode)
+ -i=false : Keep STDIN open even if not attached
If you do not specify ``-a`` then Docker will `attach everything
(stdin,stdout,stderr)
@@ -112,8 +112,8 @@ as well as persistent standard input (``stdin``), so you'll use ``-i
Container Identification
------------------------
-Name (-name)
-............
+Name (--name)
+.............
The operator can identify a container in three ways:
@@ -122,7 +122,7 @@ The operator can identify a container in three ways:
* Name ("evil_ptolemy")
The UUID identifiers come from the Docker daemon, and if you do not
-assign a name to the container with ``-name`` then the daemon will
+assign a name to the container with ``--name`` then the daemon will
also generate a random string name too. The name can become a handy
way to add meaning to a container since you can use this name when
defining :ref:`links <working_with_links_names>` (or any other place
@@ -137,7 +137,7 @@ container ID out to a file of your choosing. This is similar to how
some programs might write out their process ID to a file (you've seen
them as PID files)::
- -cidfile="": Write the container ID to the file
+ --cidfile="": Write the container ID to the file
Network Settings
----------------
@@ -145,7 +145,7 @@ Network Settings
::
-n=true : Enable networking for this container
- -dns=[] : Set custom dns servers for the container
+ --dns=[] : Set custom dns servers for the container
By default, all containers have networking enabled and they can make
any outgoing connections. The operator can completely disable
@@ -154,10 +154,10 @@ networking. In cases like this, you would perform I/O through files or
STDIN/STDOUT only.
Your container will use the same DNS servers as the host by default,
-but you can override this with ``-dns``.
+but you can override this with ``--dns``.
-Clean Up (-rm)
---------------
+Clean Up (--rm)
+---------------
By default a container's file system persists even after the container
exits. This makes debugging a lot easier (since you can inspect the
@@ -165,9 +165,9 @@ final state) and you retain all your data by default. But if you are
running short-term **foreground** processes, these container file
systems can really pile up. If instead you'd like Docker to
**automatically clean up the container and remove the file system when
-the container exits**, you can add the ``-rm`` flag::
+the container exits**, you can add the ``--rm`` flag::
- -rm=false: Automatically remove the container when it exits (incompatible with -d)
+ --rm=false: Automatically remove the container when it exits (incompatible with -d)
Runtime Constraints on CPU and Memory
@@ -193,8 +193,8 @@ Runtime Privilege and LXC Configuration
::
- -privileged=false: Give extended privileges to this container
- -lxc-conf=[]: Add custom lxc options -lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
+ --privileged=false: Give extended privileges to this container
+ --lxc-conf=[]: (lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
By default, Docker containers are "unprivileged" and cannot, for
example, run a Docker daemon inside a Docker container. This is
@@ -203,20 +203,21 @@ but a "privileged" container is given access to all devices (see
lxc-template.go_ and documentation on `cgroups devices
<https://www.kernel.org/doc/Documentation/cgroups/devices.txt>`_).
-When the operator executes ``docker run -privileged``, Docker will
+When the operator executes ``docker run --privileged``, Docker will
enable to access to all devices on the host as well as set some
configuration in AppArmor to allow the container nearly all the same
access to the host as processes running outside containers on the
-host. Additional information about running with ``-privileged`` is
+host. Additional information about running with ``--privileged`` is
available on the `Docker Blog
<http://blog.docker.io/2013/09/docker-can-now-run-within-docker/>`_.
-An operator can also specify LXC options using one or more
-``-lxc-conf`` parameters. These can be new parameters or override
-existing parameters from the lxc-template.go_. Note that in the
-future, a given host's Docker daemon may not use LXC, so this is an
-implementation-specific configuration meant for operators already
-familiar with using LXC directly.
+If the Docker daemon was started using the ``lxc`` exec-driver
+(``docker -d --exec-driver=lxc``) then the operator can also specify
+LXC options using one or more ``--lxc-conf`` parameters. These can be
+new parameters or override existing parameters from the lxc-template.go_.
+Note that in the future, a given host's Docker daemon may not use LXC,
+so this is an implementation-specific configuration meant for operators
+already familiar with using LXC directly.
.. _lxc-template.go: https://github.com/dotcloud/docker/blob/master/execdriver/lxc/lxc_template.go
@@ -260,7 +261,7 @@ ENTRYPOINT (Default Command to Execute at Runtime
::
- -entrypoint="": Overwrite the default entrypoint set by the image
+ --entrypoint="": Overwrite the default entrypoint set by the image
The ENTRYPOINT of an image is similar to a ``COMMAND`` because it
specifies what executable to run when the container starts, but it is
@@ -274,12 +275,12 @@ runtime by using a string to specify the new ``ENTRYPOINT``. Here is an
example of how to run a shell in a container that has been set up to
automatically run something else (like ``/usr/bin/redis-server``)::
- docker run -i -t -entrypoint /bin/bash example/redis
+ docker run -i -t --entrypoint /bin/bash example/redis
or two examples of how to pass more parameters to that ENTRYPOINT::
- docker run -i -t -entrypoint /bin/bash example/redis -c ls -l
- docker run -i -t -entrypoint /usr/bin/redis-cli example/redis --help
+ docker run -i -t --entrypoint /bin/bash example/redis -c ls -l
+ docker run -i -t --entrypoint /usr/bin/redis-cli example/redis --help
EXPOSE (Incoming Ports)
@@ -290,16 +291,16 @@ providing the ``EXPOSE`` instruction to give a hint to the operator
about what incoming ports might provide services. The following
options work with or override the ``Dockerfile``'s exposed defaults::
- -expose=[]: Expose a port from the container
+ --expose=[]: Expose a port from the container
without publishing it to your host
- -P=false : Publish all exposed ports to the host interfaces
- -p=[] : Publish a container's port to the host (format:
- ip:hostPort:containerPort | ip::containerPort |
- hostPort:containerPort)
- (use 'docker port' to see the actual mapping)
- -link="" : Add link to another container (name:alias)
-
-As mentioned previously, ``EXPOSE`` (and ``-expose``) make a port
+ -P=false : Publish all exposed ports to the host interfaces
+ -p=[] : Publish a container's port to the host (format:
+ ip:hostPort:containerPort | ip::containerPort |
+ hostPort:containerPort)
+ (use 'docker port' to see the actual mapping)
+ --link="" : Add link to another container (name:alias)
+
+As mentioned previously, ``EXPOSE`` (and ``--expose``) make a port
available **in** a container for incoming connections. The port number
on the inside of the container (where the service listens) does not
need to be the same number as the port exposed on the outside of the
@@ -308,16 +309,16 @@ have an HTTP service listening on port 80 (and so you ``EXPOSE 80`` in
the ``Dockerfile``), but outside the container the port might be 42800.
To help a new client container reach the server container's internal
-port operator ``-expose``'d by the operator or ``EXPOSE``'d by the
+port operator ``--expose``'d by the operator or ``EXPOSE``'d by the
developer, the operator has three choices: start the server container
-with ``-P`` or ``-p,`` or start the client container with ``-link``.
+with ``-P`` or ``-p,`` or start the client container with ``--link``.
If the operator uses ``-P`` or ``-p`` then Docker will make the
exposed port accessible on the host and the ports will be available to
any client that can reach the host. To find the map between the host
ports and the exposed ports, use ``docker port``)
-If the operator uses ``-link`` when starting the new client container,
+If the operator uses ``--link`` when starting the new client container,
then the client container can access the exposed port via a private
networking interface. Docker will set some environment variables in
the client container to help indicate which interface and port to use.
@@ -329,7 +330,7 @@ The operator can **set any environment variable** in the container by
using one or more ``-e`` flags, even overriding those already defined by the
developer with a Dockefile ``ENV``::
- $ docker run -e "deep=purple" -rm ubuntu /bin/bash -c export
+ $ docker run -e "deep=purple" --rm ubuntu /bin/bash -c export
declare -x HOME="/"
declare -x HOSTNAME="85bc26a0e200"
declare -x OLDPWD
@@ -341,13 +342,13 @@ developer with a Dockefile ``ENV``::
Similarly the operator can set the **hostname** with ``-h``.
-``-link name:alias`` also sets environment variables, using the
+``--link name:alias`` also sets environment variables, using the
*alias* string to define environment variables within the container
that give the IP and PORT information for connecting to the service
container. Let's imagine we have a container running Redis::
# Start the service container, named redis-name
- $ docker run -d -name redis-name dockerfiles/redis
+ $ docker run -d --name redis-name dockerfiles/redis
4241164edf6f5aca5b0e9e4c9eccd899b0b8080c64c0cd26efe02166c73208f3
# The redis-name container exposed port 6379
@@ -361,12 +362,12 @@ container. Let's imagine we have a container running Redis::
Yet we can get information about the Redis container's exposed ports
-with ``-link``. Choose an alias that will form a valid environment
+with ``--link``. Choose an alias that will form a valid environment
variable!
::
- $ docker run -rm -link redis-name:redis_alias -entrypoint /bin/bash dockerfiles/redis -c export
+ $ docker run --rm --link redis-name:redis_alias --entrypoint /bin/bash dockerfiles/redis -c export
declare -x HOME="/"
declare -x HOSTNAME="acda7f7b1cdc"
declare -x OLDPWD
@@ -383,7 +384,7 @@ variable!
And we can use that information to connect from another container as a client::
- $ docker run -i -t -rm -link redis-name:redis_alias -entrypoint /bin/bash dockerfiles/redis -c '/redis-stable/src/redis-cli -h $REDIS_ALIAS_PORT_6379_TCP_ADDR -p $REDIS_ALIAS_PORT_6379_TCP_PORT'
+ $ docker run -i -t --rm --link redis-name:redis_alias --entrypoint /bin/bash dockerfiles/redis -c '/redis-stable/src/redis-cli -h $REDIS_ALIAS_PORT_6379_TCP_ADDR -p $REDIS_ALIAS_PORT_6379_TCP_PORT'
172.17.0.32:6379>
VOLUME (Shared Filesystems)
@@ -393,7 +394,7 @@ VOLUME (Shared Filesystems)
-v=[]: Create a bind mount with: [host-dir]:[container-dir]:[rw|ro].
If "container-dir" is missing, then docker creates a new volume.
- -volumes-from="": Mount all volumes from the given container(s)
+ --volumes-from="": Mount all volumes from the given container(s)
The volumes commands are complex enough to have their own
documentation in section :ref:`volume_def`. A developer can define one
diff --git a/docs/sources/terms/images/docker-filesystems-busyboxrw.png b/docs/sources/terms/images/docker-filesystems-busyboxrw.png
index ad41c940e4..9ff8487b89 100644
--- a/docs/sources/terms/images/docker-filesystems-busyboxrw.png
+++ b/docs/sources/terms/images/docker-filesystems-busyboxrw.png
Binary files differ
diff --git a/docs/sources/terms/images/docker-filesystems-debian.png b/docs/sources/terms/images/docker-filesystems-debian.png
index 823a215d3e..61e5ddb2e3 100644
--- a/docs/sources/terms/images/docker-filesystems-debian.png
+++ b/docs/sources/terms/images/docker-filesystems-debian.png
Binary files differ
diff --git a/docs/sources/terms/images/docker-filesystems-debianrw.png b/docs/sources/terms/images/docker-filesystems-debianrw.png
index 97c69a9944..cacba4947b 100644
--- a/docs/sources/terms/images/docker-filesystems-debianrw.png
+++ b/docs/sources/terms/images/docker-filesystems-debianrw.png
Binary files differ
diff --git a/docs/sources/terms/images/docker-filesystems-generic.png b/docs/sources/terms/images/docker-filesystems-generic.png
index fb734b75c6..ae54b72e88 100644
--- a/docs/sources/terms/images/docker-filesystems-generic.png
+++ b/docs/sources/terms/images/docker-filesystems-generic.png
Binary files differ
diff --git a/docs/sources/terms/images/docker-filesystems-multilayer.png b/docs/sources/terms/images/docker-filesystems-multilayer.png
index 0b3ae19c2c..daedebe9c1 100644
--- a/docs/sources/terms/images/docker-filesystems-multilayer.png
+++ b/docs/sources/terms/images/docker-filesystems-multilayer.png
Binary files differ
diff --git a/docs/sources/terms/images/docker-filesystems-multiroot.png b/docs/sources/terms/images/docker-filesystems-multiroot.png
index 5e864273f3..65b61d94f1 100644
--- a/docs/sources/terms/images/docker-filesystems-multiroot.png
+++ b/docs/sources/terms/images/docker-filesystems-multiroot.png
Binary files differ
diff --git a/docs/sources/terms/images/docker-filesystems.svg b/docs/sources/terms/images/docker-filesystems.svg
index d41aff2522..054402db4c 100644
--- a/docs/sources/terms/images/docker-filesystems.svg
+++ b/docs/sources/terms/images/docker-filesystems.svg
@@ -11,7 +11,7 @@
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
- inkscape:export-filename="/Users/arothfusz/src/metalivedev/docker/docs/sources/terms/images/docker-filesystems-multiroot.png"
+ inkscape:export-filename="/Users/arothfusz/src/metalivedev/dockerclone/docs/sources/terms/images/docker-filesystems-multilayer.png"
sodipodi:docname="docker-filesystems.svg"
width="800"
height="600"
@@ -26,10 +26,10 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.82666667"
- inkscape:cx="236.08871"
+ inkscape:cx="495.95588"
inkscape:cy="300"
inkscape:document-units="px"
- inkscape:current-layer="layer2"
+ inkscape:current-layer="layer13"
showgrid="false"
width="800px"
inkscape:window-width="1327"
@@ -98,6 +98,32 @@
</sodipodi:namedview>
<defs
id="defs4">
+ <marker
+ inkscape:stockid="Arrow1Mend"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow1Mend"
+ style="overflow:visible;">
+ <path
+ id="path4054"
+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
+ transform="scale(0.4) rotate(180) translate(10,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow1Lend"
+ style="overflow:visible;">
+ <path
+ id="path4048"
+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
+ transform="scale(0.8) rotate(180) translate(12.5,0)" />
+ </marker>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="-406.34117 : 522.93291 : 1"
@@ -149,7 +175,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
+ <dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
@@ -294,70 +320,9 @@
d="m 514.91047,422.62215 c 0,0 -1.06434,42.27288 -1.06434,42.27288 0,0 4.45362,-2.8241 4.45362,-2.8241 0.2761,-0.17507 0.46813,-0.15759 0.57629,0.0523 0.10868,0.18619 0.15712,0.50328 0.14534,0.95133 -0.0112,0.42443 -0.0782,0.81493 -0.20113,1.17164 -0.12299,0.35687 -0.32235,0.62363 -0.59831,0.80035 0,0 -10.15763,6.50487 -10.15763,6.50487 -0.27917,0.17878 -0.476,0.16246 -0.5903,-0.0494 -0.11437,-0.21191 -0.16642,-0.53506 -0.15609,-0.96944 0.0109,-0.45857 0.0801,-0.85922 0.20776,-1.20182 0.12814,-0.36656 0.33197,-0.63844 0.61129,-0.81556 0,0 4.56188,-2.89274 4.56188,-2.89274 0,0 0.97884,-39.26779 0.97884,-39.26779 0,0 -3.35907,1.85407 -3.35907,1.85407 -0.27977,0.15447 -0.48159,0.1208 -0.60529,-0.10124 -0.11445,-0.22726 -0.16609,-0.57399 -0.15489,-1.04015 0.0106,-0.44163 0.0802,-0.843 0.20889,-1.204 0.12859,-0.36073 0.33761,-0.62003 0.62686,-0.77784 0,0 4.51628,-2.46343 4.51628,-2.46343"
inkscape:connector-curvature="0" />
</g>
- <g
- id="text3655"
- style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
- transform="matrix(0.67123869,0,0,0.67123869,53.68199,126.56876)">
- <path
- id="path3662"
- d="m 132.8684,367.78607 c 0,0 0.71572,-54.35962 0.71572,-54.35962 0,0 2.66242,1.51122 2.66242,1.51122 0,0 -0.71153,54.62187 -0.71153,54.62187 0,0 -2.66661,-1.77347 -2.66661,-1.77347"
- inkscape:connector-curvature="0" />
- <path
- id="path3664"
- d="m 137.92667,371.15014 c 0,0 6.14809,-16.99741 6.14809,-16.99741 0,0 -5.19986,-22.51479 -5.19986,-22.51479 0,0 3.39897,2.02031 3.39897,2.02031 0,0 2.36954,10.8944 2.36954,10.8944 0.44814,2.07993 0.80843,3.81608 1.08051,5.20679 0.47284,-1.39022 0.90795,-2.61465 1.30519,-3.67276 0,0 2.89882,-7.87895 2.89882,-7.87895 0,0 3.37501,2.00607 3.37501,2.00607 0,0 -5.97372,15.60005 -5.97372,15.60005 0,0 5.92178,25.52797 5.92178,25.52797 0,0 -3.4783,-2.3133 -3.4783,-2.3133 0,0 -3.23409,-14.8189 -3.23409,-14.8189 0,0 -0.8528,-3.95585 -0.8528,-3.95585 0,0 -4.46772,13.08538 -4.46772,13.08538 0,0 -3.29142,-2.18901 -3.29142,-2.18901"
- inkscape:connector-curvature="0" />
- <path
- id="path3666"
- d="m 166.82131,374.91047 c 0,0 2.93572,2.79373 2.93572,2.79373 -0.37761,4.62343 -1.24922,7.86985 -2.61073,9.73548 -1.34456,1.83887 -2.96947,2.11901 -4.86973,0.85217 -2.3637,-1.5758 -4.23108,-4.67579 -5.61088,-9.29124 -1.36166,-4.61024 -1.99867,-10.32878 -1.91636,-17.16995 0.0532,-4.42099 0.40174,-8.10179 1.04648,-11.0477 0.64585,-2.95094 1.59765,-4.88106 2.85839,-5.78928 1.27692,-0.93132 2.65738,-0.95975 4.14303,-0.0791 1.88674,1.11849 3.42575,3.18947 4.61182,6.21733 1.19146,3.01472 1.93755,6.74983 2.23475,11.20086 0,0 -2.92082,-0.72724 -2.92082,-0.72724 -0.24353,-2.97398 -0.70922,-5.3811 -1.39599,-7.22057 -0.67412,-1.8282 -1.50208,-3.03683 -2.48268,-3.62779 -1.47568,-0.88924 -2.68418,-0.33926 -3.629,1.6424 -0.94184,1.95024 -1.44412,5.64763 -1.50886,11.09862 -0.0657,5.53171 0.32577,9.83698 1.17652,12.92095 0.85352,3.09406 1.99526,5.11378 3.42833,6.05501 1.15583,0.75914 2.13411,0.54393 2.93293,-0.65009 0.80075,-1.19694 1.32691,-3.50191 1.57708,-6.91359"
- inkscape:connector-curvature="0" />
- <path
- id="path3668"
- d="m 172.97661,394.46064 c 0,0 0.0905,-8.17492 0.0905,-8.17492 0,0 3.48861,2.27245 3.48861,2.27245 0,0 -0.0895,8.22327 -0.0895,8.22327 -0.0329,3.02363 -0.28765,5.30542 -0.76375,6.84314 -0.47577,1.56243 -1.21303,2.51325 -2.20987,2.85324 0,0 -0.81311,-3.65386 -0.81311,-3.65386 0.65091,-0.22881 1.13685,-0.89297 1.45702,-1.99285 0.32015,-1.07418 0.51068,-2.8142 0.57137,-5.21909 0,0 -1.73124,-1.15138 -1.73124,-1.15138"
- inkscape:connector-curvature="0" />
- <path
- id="path3670"
- d="m 204.77784,410.06983 c -1.27022,1.55778 -2.48568,2.44071 -3.64678,2.65261 -1.1447,0.21934 -2.36657,-0.10529 -3.66459,-0.97064 -2.13127,-1.42084 -3.74779,-3.67649 -4.85717,-6.76514 -1.10483,-3.1041 -1.63719,-6.47275 -1.60031,-10.11391 0.0216,-2.13477 0.25062,-3.94364 0.6874,-5.42825 0.44957,-1.50612 1.02226,-2.57799 1.71876,-3.21526 0.71002,-0.63098 1.50367,-0.94896 2.38159,-0.95288 0.64759,0.017 1.6255,0.25355 2.93681,0.71095 2.68835,0.95136 4.68535,1.32634 5.97773,1.11825 0.0222,-1.02578 0.0346,-1.67832 0.0372,-1.95765 0.0289,-3.07178 -0.26872,-5.42898 -0.8919,-7.06976 -0.84101,-2.21749 -2.10184,-3.83086 -3.77761,-4.84085 -1.55688,-0.93829 -2.71034,-1.00947 -3.46489,-0.21839 -0.74047,0.76925 -1.30109,2.5996 -1.68287,5.49061 0,0 -3.16708,-2.94172 -3.16708,-2.94172 0.31864,-2.91383 0.81734,-5.11515 1.49696,-6.60484 0.6812,-1.51989 1.65517,-2.41342 2.92464,-2.67921 1.27473,-0.29431 2.75127,0.0544 4.43259,1.05105 1.67794,0.99472 3.04366,2.25211 4.09313,3.7721 1.05306,1.52531 1.82526,3.12483 2.31452,4.79681 0.49033,1.64692 0.82696,3.5698 1.00937,5.76792 0.10151,1.36012 0.13673,3.72492 0.1056,7.09479 0,0 -0.0935,10.11679 -0.0935,10.11679 -0.0653,7.05995 -0.0372,11.58025 0.0844,13.55797 0.13448,1.95911 0.40887,3.94126 0.8236,5.94773 0,0 -3.55349,-2.3633 -3.55349,-2.3633 -0.33594,-1.80359 -0.5439,-3.78856 -0.62416,-5.9558 m -0.12224,-17.05427 c -1.23154,0.34731 -3.06331,0.14247 -5.48491,-0.60924 -1.36335,-0.41924 -2.32581,-0.53009 -2.89103,-0.33412 -0.56424,0.19568 -1.00286,0.73389 -1.31639,1.61435 -0.31298,0.85222 -0.4758,1.92485 -0.48867,3.21853 -0.0197,1.98221 0.29058,3.84732 0.93197,5.59804 0.65498,1.76261 1.62279,3.0659 2.90625,3.90947 1.27641,0.83893 2.42209,0.96176 3.43544,0.36456 1.01669,-0.62694 1.7731,-1.89094 2.26739,-3.79238 0.3778,-1.47261 0.58252,-3.87376 0.61388,-7.20158 0,0 0.0261,-2.76763 0.0261,-2.76763"
- inkscape:connector-curvature="0" />
- <path
- id="path3672"
- d="m 226.91498,430.33317 c 0,0 0.056,-6.79135 0.056,-6.79135 -1.69979,4.12585 -3.95958,5.23997 -6.76691,3.36841 -1.23125,-0.82083 -2.37518,-2.1017 -3.4326,-3.84047 -1.04088,-1.72429 -1.81148,-3.52427 -2.31374,-5.40182 -0.48827,-1.89422 -0.82487,-4.02954 -1.01034,-6.40682 -0.12775,-1.59592 -0.17698,-4.02489 -0.14772,-7.28678 0,0 0.25063,-27.95019 0.25063,-27.95019 0,0 3.47921,2.068 3.47921,2.068 0,0 -0.22098,25.15376 -0.22098,25.15376 -0.0353,4.02044 0.0122,6.77614 0.14272,8.26649 0.20297,2.17003 0.65699,4.07445 1.36316,5.71471 0.70804,1.61546 1.59303,2.77268 2.65633,3.47053 1.06676,0.70016 2.07587,0.76801 3.02668,0.20066 0.95364,-0.59783 1.63329,-1.79901 2.03728,-3.60358 0.41794,-1.82668 0.64337,-4.71043 0.67595,-8.64861 0,0 0.20406,-24.67831 0.20406,-24.67831 0,0 3.62583,2.15515 3.62583,2.15515 0,0 -0.37466,46.37229 -0.37466,46.37229 0,0 -3.25092,-2.16207 -3.25092,-2.16207"
- inkscape:connector-curvature="0" />
- <path
- id="path3674"
- d="m 236.84818,436.9394 c 0,0 0.31458,-40.68866 0.31458,-40.68866 0,0 -3.27066,-1.97443 -3.27066,-1.97443 0,0 0.0485,-6.13244 0.0485,-6.13244 0,0 3.26986,1.94357 3.26986,1.94357 0,0 0.0384,-4.9718 0.0384,-4.9718 0.0242,-3.13718 0.17313,-5.39171 0.44675,-6.76504 0.37445,-1.8466 1.0157,-3.14492 1.92523,-3.8952 0.92597,-0.77365 2.21207,-0.69593 3.86256,0.23811 1.06731,0.60412 2.24898,1.54093 3.54628,2.81271 0,0 -0.62418,6.66996 -0.62418,6.66996 -0.78934,-0.75385 -1.53564,-1.33338 -2.23919,-1.73932 -1.15067,-0.66373 -1.96603,-0.6152 -2.44858,0.14318 -0.48194,0.75751 -0.73333,2.55103 -0.75467,5.38196 0,0 -0.0327,4.33654 -0.0327,4.33654 0,0 4.35398,2.58795 4.35398,2.58795 0,0 -0.0456,6.23957 -0.0456,6.23957 0,0 -4.35509,-2.62908 -4.35509,-2.62908 0,0 -0.30843,40.92114 -0.30843,40.92114 0,0 -3.72704,-2.47872 -3.72704,-2.47872"
- inkscape:connector-curvature="0" />
- <path
- id="path3676"
- d="m 246.46465,429.05307 c 0,0 3.81968,1.1922 3.81968,1.1922 0.19276,3.35392 0.7721,6.20708 1.74012,8.56243 0.98544,2.37207 2.3721,4.14723 4.16469,5.32459 1.81668,1.19318 3.17579,1.3205 4.07171,0.37548 0.89826,-0.97786 1.35491,-2.50699 1.36833,-4.58524 0.012,-1.86394 -0.37148,-3.58214 -1.14903,-5.15206 -0.54183,-1.08052 -1.89103,-2.87259 -4.03793,-5.36553 -2.87017,-3.33767 -4.84719,-5.88768 -5.94667,-7.66691 -1.08128,-1.7942 -1.8993,-3.82568 -2.45597,-6.09572 -0.54119,-2.28674 -0.80303,-4.59245 -0.78627,-6.91984 0.0153,-2.11796 0.25669,-3.93345 0.72469,-5.44816 0.48302,-1.53765 1.12853,-2.66509 1.93745,-3.38209 0.60808,-0.56866 1.4316,-0.86027 2.47213,-0.87408 1.05827,-0.0353 2.19002,0.30354 3.396,1.01839 1.82428,1.08147 3.42677,2.57943 4.80442,4.49544 1.39816,1.9329 2.42778,4.04798 3.08549,6.34283 0.65928,2.26923 1.10658,5.05898 1.34104,8.36831 0,0 -3.93498,-1.30965 -3.93498,-1.30965 -0.1613,-2.60573 -0.66572,-4.86818 -1.51169,-6.78511 -0.82908,-1.90296 -2.01211,-3.31622 -3.54556,-4.24034 -1.80214,-1.08596 -3.08681,-1.24118 -3.85989,-0.47117 -0.77146,0.76845 -1.16235,1.97686 -1.17391,3.62665 -0.007,1.05006 0.14407,2.09235 0.45452,3.12753 0.31055,1.06635 0.80269,2.09487 1.47721,3.08626 0.38829,0.54294 1.53561,1.95069 3.44979,4.23261 2.78949,3.29205 4.7444,5.79841 5.85003,7.50277 1.12436,1.68881 2.00304,3.68747 2.63416,5.99522 0.63237,2.3125 0.94024,4.88426 0.92265,7.71231 -0.0173,2.76736 -0.43134,5.12235 -1.24099,7.06139 -0.79291,1.91427 -1.93089,3.05649 -3.41056,3.42835 -1.47342,0.33983 -3.12755,-0.1039 -4.95957,-1.32524 -3.01245,-2.00831 -5.28496,-4.82452 -6.83171,-8.44857 -1.52498,-3.59708 -2.47979,-8.05614 -2.86938,-13.38305"
- inkscape:connector-curvature="0" />
- <path
- id="path3678"
- d="m 267.46509,458.46409 c 0,0 10.16276,-64.44628 10.16276,-64.44628 0,0 3.35985,1.90154 3.35985,1.90154 0,0 -10.22211,64.7453 -10.22211,64.7453 0,0 -3.3005,-2.20056 -3.3005,-2.20056"
- inkscape:connector-curvature="0" />
- <path
- id="path3680"
- d="m 287.73074,470.77961 c 0,0 -3.98413,-2.64971 -3.98413,-2.64971 0,0 0.36657,-69.26132 0.36657,-69.26132 0,0 4.28286,2.431 4.28286,2.431 0,0 -0.12574,24.80354 -0.12574,24.80354 1.84841,-3.43804 4.20286,-4.3171 7.07399,-2.61515 1.5995,0.94822 3.11282,2.48894 4.53901,4.62548 1.44866,2.12297 2.63509,4.62828 3.55675,7.51533 0.94101,2.87289 1.67339,6.11301 2.19582,9.71903 0.52331,3.61258 0.77764,7.29172 0.76223,11.03361 -0.0367,8.8888 -1.19889,15.02735 -3.47692,18.39523 -2.26525,3.34891 -4.9514,3.97742 -8.04813,1.91293 -3.05429,-2.0362 -5.42013,-6.12345 -7.11007,-12.2502 0,0 -0.0322,6.34023 -0.0322,6.34023 m 0.0826,-25.6991 c -0.0308,6.05748 0.36263,10.70405 1.18198,13.94323 1.3439,5.31484 3.18967,8.7503 5.54452,10.29694 1.92772,1.26611 3.60983,0.72174 5.04245,-1.64447 1.43781,-2.407 2.17299,-6.89882 2.20167,-13.46572 0.0293,-6.72399 -0.63702,-12.10528 -1.99483,-16.13506 -1.33586,-4.00333 -2.96003,-6.57643 -4.86901,-7.72687 -1.91517,-1.15407 -3.57055,-0.50907 -4.97003,1.92406 -1.39445,2.39298 -2.10547,6.6592 -2.13675,12.80789"
- inkscape:connector-curvature="0" />
- <path
- id="path3682"
- d="m 322.12463,485.58433 c 0,0 0.65936,8.40758 0.65936,8.40758 -1.33673,-0.35442 -2.52804,-0.88064 -3.57528,-1.5781 -1.70425,-1.13503 -3.01872,-2.52454 -3.94739,-4.16917 -0.92628,-1.6404 -1.57435,-3.40805 -1.9457,-5.30454 -0.37079,-1.92713 -0.54592,-5.5546 -0.52573,-10.88197 0,0 0.114,-30.08386 0.114,-30.08386 0,0 -3.36894,-2.03377 -3.36894,-2.03377 0,0 0.0272,-6.84805 0.0272,-6.84805 0,0 3.36786,2.00182 3.36786,2.00182 0,0 0.0489,-12.91135 0.0489,-12.91135 0,0 4.63253,-2.66881 4.63253,-2.66881 0,0 -0.065,18.3241 -0.065,18.3241 0,0 4.72675,2.80952 4.72675,2.80952 0,0 -0.023,6.96866 -0.023,6.96866 0,0 -4.72829,-2.85438 -4.72829,-2.85438 0,0 -0.10923,30.77205 -0.10923,30.77205 -0.009,2.54809 0.0632,4.23726 0.21665,5.06728 0.17091,0.8418 0.43796,1.59732 0.80137,2.26677 0.38115,0.6815 0.92028,1.25067 1.61806,1.70755 0.52419,0.34326 1.21588,0.67931 2.07599,1.00867"
- inkscape:connector-curvature="0" />
- <path
- id="path3684"
- d="m 326.68371,496.68588 c 0,0 0.16352,-53.31935 0.16352,-53.31935 0,0 4.33405,2.57612 4.33405,2.57612 0,0 -0.0231,8.11168 -0.0231,8.11168 1.12479,-3.12783 2.15869,-5.02087 3.10122,-5.67423 0.96285,-0.64401 2.01732,-0.62746 3.16426,0.0524 1.66273,0.98571 3.35799,2.97819 5.08643,5.98483 0,0 -1.73463,7.50163 -1.73463,7.50163 -1.20956,-2.06252 -2.41678,-3.45673 -3.62177,-4.18598 -1.07402,-0.64988 -2.03784,-0.62407 -2.89238,0.075 -0.85268,0.66393 -1.46157,1.94671 -1.82782,3.84834 -0.54904,2.90043 -0.82874,6.26858 -0.83955,10.10792 0,0 -0.0793,28.13461 -0.0793,28.13461 0,0 -4.83103,-3.21295 -4.83103,-3.21295"
- inkscape:connector-curvature="0" />
- <path
- id="path3686"
- d="m 346.63844,509.95707 c 0,0 0.0968,-47.55946 0.0968,-47.55946 0,0 -4.43131,-2.6751 -4.43131,-2.6751 0,0 0.0162,-7.15908 0.0162,-7.15908 0,0 4.42975,2.633 4.42975,2.633 0,0 0.0118,-5.80848 0.0118,-5.80848 0.007,-3.66486 0.19039,-6.28429 0.54899,-7.86025 0.49107,-2.11858 1.34725,-3.56796 2.57091,-4.34826 1.24623,-0.8062 2.9874,-0.57829 5.2303,0.69102 1.45137,0.82149 3.06136,2.04536 4.83196,3.67489 0,0 -0.79224,7.74699 -0.79224,7.74699 -1.07705,-0.96968 -2.09389,-1.73012 -3.05099,-2.28234 -1.56464,-0.90254 -2.66858,-0.93449 -3.31577,-0.0995 -0.64623,0.83385 -0.9719,2.90502 -0.97777,6.21534 0,0 -0.009,5.07119 -0.009,5.07119 0,0 5.92043,3.51903 5.92043,3.51903 0,0 -0.0107,7.30549 -0.0107,7.30549 0,0 -5.92257,-3.57534 -5.92257,-3.57534 0,0 -0.0849,47.87735 -0.0849,47.87735 0,0 -5.0619,-3.36649 -5.0619,-3.36649"
- inkscape:connector-curvature="0" />
- <path
- id="path3688"
- d="m 359.60073,501.90418 c 0,0 5.20059,1.86777 5.20059,1.86777 0.29001,3.96114 1.10193,7.38322 2.43911,10.27061 1.36176,2.91073 3.2661,5.17238 5.72054,6.78444 2.48967,1.63519 4.34728,1.95881 5.56379,0.96109 1.21993,-1.0365 1.83154,-2.77869 1.83229,-5.22389 6.2e-4,-2.19296 -0.5384,-4.26389 -1.61481,-6.20909 -0.7497,-1.33918 -2.60804,-3.61528 -5.55946,-6.8122 -3.94075,-4.27425 -6.65395,-7.50944 -8.16465,-9.73106 -1.48522,-2.23573 -2.61386,-4.7171 -3.38893,-7.44614 -0.75395,-2.74593 -1.12852,-5.48045 -1.12491,-8.2074 0.003,-2.48146 0.31617,-4.58205 0.93929,-6.30404 0.64345,-1.7475 1.51123,-2.99566 2.60481,-3.74404 0.82208,-0.59757 1.93976,-0.84564 3.35554,-0.74295 1.44048,0.0796 2.98492,0.60687 4.63457,1.58472 2.49729,1.48044 4.69744,3.42626 6.59564,5.83924 1.92772,2.43694 3.35406,5.04673 4.27363,7.82559 0.92183,2.74989 1.55812,6.08842 1.90744,10.01415 0,0 -5.39591,-2.01583 -5.39591,-2.01583 -0.24253,-3.08522 -0.95109,-5.80694 -2.12313,-8.16184 -1.14834,-2.33544 -2.7751,-4.13563 -4.87465,-5.40091 -2.46541,-1.48565 -4.2164,-1.81727 -5.26239,-1.00324 -1.04343,0.8121 -1.56519,2.18465 -1.56724,4.11944 -10e-4,1.23148 0.21335,2.47259 0.64434,3.72428 0.43146,1.28852 1.10985,2.55443 2.03645,3.7988 0.53331,0.68393 2.10812,2.47474 4.73703,5.38635 3.83534,4.20888 6.52812,7.39657 8.05468,9.53851 1.55295,2.12718 2.77297,4.59004 3.65706,7.38727 0.88613,2.80397 1.33003,5.87348 1.33006,9.20426 -3e-5,3.25947 -0.54743,5.98195 -1.64026,8.16269 -1.06972,2.15296 -2.61798,3.35081 -4.63932,3.59644 -2.01164,0.20856 -4.27524,-0.52848 -6.78627,-2.2025 -4.12399,-2.74933 -7.24172,-6.34882 -9.37583,-10.80056 -2.10254,-4.4137 -3.43626,-9.76409 -4.0091,-16.05996"
- inkscape:connector-curvature="0" />
- </g>
</g>
<g
- style="display:inline"
+ style="display:none"
inkscape:groupmode="layer"
id="layer9"
inkscape:label="GenericRootfs">
@@ -553,7 +518,7 @@
</g>
</g>
<g
- style="display:none"
+ style="display:inline"
inkscape:label="Debian"
id="layer5"
inkscape:groupmode="layer">
@@ -1178,7 +1143,7 @@
inkscape:groupmode="layer"
id="layer10"
inkscape:label="Base Image"
- style="display:none">
+ style="display:inline">
<g
transform="matrix(0.71864924,0,0,0.71864924,102.10269,88.99025)"
style="font-size:40px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Courier New;-inkscape-font-specification:Courier New Bold"
@@ -1251,6 +1216,36 @@
inkscape:connector-curvature="0" />
</g>
</g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer13"
+ inkscape:label="Parent Pointer">
+ <path
+ style="fill:none;stroke:#000000;stroke-width:4.80000019;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Mend)"
+ d="m 546.77419,134.2742 c 110.08065,13.30645 1.20968,53.2258 1.20968,53.2258"
+ id="path3272"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc" />
+ <text
+ xml:space="preserve"
+ style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:103.99999619%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Helvetica"
+ x="601.20972"
+ y="125.80645"
+ id="text4672"
+ sodipodi:linespacing="104%"><tspan
+ sodipodi:role="line"
+ id="tspan4674"
+ x="601.20972"
+ y="125.80645">references</tspan><tspan
+ sodipodi:role="line"
+ x="601.20972"
+ y="159.08644"
+ id="tspan4676">parent</tspan><tspan
+ sodipodi:role="line"
+ x="601.20972"
+ y="192.36644"
+ id="tspan4678">image</tspan></text>
+ </g>
</g>
<g
style="display:none"
diff --git a/docs/sources/use/ambassador_pattern_linking.rst b/docs/sources/use/ambassador_pattern_linking.rst
index e7cdbd7c96..bbd5816768 100644
--- a/docs/sources/use/ambassador_pattern_linking.rst
+++ b/docs/sources/use/ambassador_pattern_linking.rst
@@ -43,26 +43,26 @@ Start actual redis server on one Docker host
.. code-block:: bash
- big-server $ docker run -d -name redis crosbymichael/redis
+ big-server $ docker run -d --name redis crosbymichael/redis
Then add an ambassador linked to the redis server, mapping a port to the outside world
.. code-block:: bash
- big-server $ docker run -d -link redis:redis -name redis_ambassador -p 6379:6379 svendowideit/ambassador
+ big-server $ docker run -d --link redis:redis --name redis_ambassador -p 6379:6379 svendowideit/ambassador
On the other host, you can set up another ambassador setting environment variables for each remote port we want to proxy to the ``big-server``
.. code-block:: bash
- client-server $ docker run -d -name redis_ambassador -expose 6379 -e REDIS_PORT_6379_TCP=tcp://192.168.1.52:6379 svendowideit/ambassador
+ client-server $ docker run -d --name redis_ambassador --expose 6379 -e REDIS_PORT_6379_TCP=tcp://192.168.1.52:6379 svendowideit/ambassador
Then on the ``client-server`` host, you can use a redis client container to talk
to the remote redis server, just by linking to the local redis ambassador.
.. code-block:: bash
- client-server $ docker run -i -t -rm -link redis_ambassador:redis relateiq/redis-cli
+ client-server $ docker run -i -t --rm --link redis_ambassador:redis relateiq/redis-cli
redis 172.17.0.160:6379> ping
PONG
@@ -79,19 +79,19 @@ On the docker host (192.168.1.52) that redis will run on:
.. code-block:: bash
# start actual redis server
- $ docker run -d -name redis crosbymichael/redis
+ $ docker run -d --name redis crosbymichael/redis
# get a redis-cli container for connection testing
$ docker pull relateiq/redis-cli
# test the redis server by talking to it directly
- $ docker run -t -i -rm -link redis:redis relateiq/redis-cli
+ $ docker run -t -i --rm --link redis:redis relateiq/redis-cli
redis 172.17.0.136:6379> ping
PONG
^D
# add redis ambassador
- $ docker run -t -i -link redis:redis -name redis_ambassador -p 6379:6379 busybox sh
+ $ docker run -t -i --link redis:redis --name redis_ambassador -p 6379:6379 busybox sh
in the redis_ambassador container, you can see the linked redis containers's env
@@ -119,7 +119,7 @@ This environment is used by the ambassador socat script to expose redis to the w
$ docker rm redis_ambassador
$ sudo ./contrib/mkimage-unittest.sh
- $ docker run -t -i -link redis:redis -name redis_ambassador -p 6379:6379 docker-ut sh
+ $ docker run -t -i --link redis:redis --name redis_ambassador -p 6379:6379 docker-ut sh
$ socat TCP4-LISTEN:6379,fork,reuseaddr TCP4:172.17.0.136:6379
@@ -127,7 +127,7 @@ then ping the redis server via the ambassador
.. code-block::bash
- $ docker run -i -t -rm -link redis_ambassador:redis relateiq/redis-cli
+ $ docker run -i -t --rm --link redis_ambassador:redis relateiq/redis-cli
redis 172.17.0.160:6379> ping
PONG
@@ -136,7 +136,7 @@ Now goto a different server
.. code-block:: bash
$ sudo ./contrib/mkimage-unittest.sh
- $ docker run -t -i -expose 6379 -name redis_ambassador docker-ut sh
+ $ docker run -t -i --expose 6379 --name redis_ambassador docker-ut sh
$ socat TCP4-LISTEN:6379,fork,reuseaddr TCP4:192.168.1.52:6379
@@ -145,7 +145,7 @@ and get the redis-cli image so we can talk over the ambassador bridge
.. code-block:: bash
$ docker pull relateiq/redis-cli
- $ docker run -i -t -rm -link redis_ambassador:redis relateiq/redis-cli
+ $ docker run -i -t --rm --link redis_ambassador:redis relateiq/redis-cli
redis 172.17.0.160:6379> ping
PONG
@@ -157,7 +157,7 @@ When you start the container, it uses a small ``sed`` script to parse out the (p
link environment variables to set up the port forwarding. On the remote host, you need to set the
variable using the ``-e`` command line option.
-``-expose 1234 -e REDIS_PORT_1234_TCP=tcp://192.168.1.52:6379`` will forward the
+``--expose 1234 -e REDIS_PORT_1234_TCP=tcp://192.168.1.52:6379`` will forward the
local ``1234`` port to the remote IP and port - in this case ``192.168.1.52:6379``.
@@ -171,9 +171,9 @@ local ``1234`` port to the remote IP and port - in this case ``192.168.1.52:6379
# docker build -t SvenDowideit/ambassador .
# docker tag SvenDowideit/ambassador ambassador
# then to run it (on the host that has the real backend on it)
- # docker run -t -i -link redis:redis -name redis_ambassador -p 6379:6379 ambassador
+ # docker run -t -i --link redis:redis --name redis_ambassador -p 6379:6379 ambassador
# on the remote host, you can set up another ambassador
- # docker run -t -i -name redis_ambassador -expose 6379 sh
+ # docker run -t -i --name redis_ambassador --expose 6379 sh
FROM docker-ut
MAINTAINER SvenDowideit@home.org.au
diff --git a/docs/sources/use/basics.rst b/docs/sources/use/basics.rst
index 24c22bba39..4164e706f7 100644
--- a/docs/sources/use/basics.rst
+++ b/docs/sources/use/basics.rst
@@ -39,7 +39,9 @@ Repository to a local image cache.
12 character hash ``539c0211cd76: Download complete`` which is the
short form of the image ID. These short image IDs are the first 12
characters of the full image ID - which can be found using ``docker
- inspect`` or ``docker images -notrunc=true``
+ inspect`` or ``docker images --no-trunc=true``
+
+ **If you're using OS X** then you shouldn't use ``sudo``
Running an interactive shell
----------------------------
diff --git a/docs/sources/use/chef.rst b/docs/sources/use/chef.rst
new file mode 100644
index 0000000000..919eba7a8f
--- /dev/null
+++ b/docs/sources/use/chef.rst
@@ -0,0 +1,95 @@
+:title: Chef Usage
+:description: Installation and using Docker via Chef
+:keywords: chef, installation, usage, docker, documentation
+
+.. _install_using_chef:
+
+Using Chef
+=============
+
+.. note::
+
+ Please note this is a community contributed installation path. The
+ only 'official' installation is using the :ref:`ubuntu_linux`
+ installation path. This version may sometimes be out of date.
+
+Requirements
+------------
+
+To use this guide you'll need a working installation of
+`Chef <http://www.getchef.com/>`_. This cookbook supports a variety of
+operating systems.
+
+Installation
+------------
+
+The cookbook is available on the `Chef Community Site
+<community.opscode.com/cookbooks/docker>`_ and can be installed
+using your favorite cookbook dependency manager.
+
+The source can be found on `GitHub
+<https://github.com/bflad/chef-docker>`_.
+
+Usage
+-----
+
+The cookbook provides recipes for installing Docker, configuring init
+for Docker, and resources for managing images and containers.
+It supports almost all Docker functionality.
+
+Installation
+~~~~~~~~~~~~
+
+.. code-block:: ruby
+
+ include_recipe 'docker'
+
+Images
+~~~~~~
+
+The next step is to pull a Docker image. For this, we have a resource:
+
+.. code-block:: ruby
+
+ docker_image 'samalba/docker-registry'
+
+This is equivalent to running:
+
+.. code-block:: bash
+
+ docker pull samalba/docker-registry
+
+There are attributes available to control how long the cookbook
+will allow for downloading (5 minute default).
+
+To remove images you no longer need:
+
+.. code-block:: ruby
+
+ docker_image 'samalba/docker-registry' do
+ action :remove
+ end
+
+Containers
+~~~~~~~~~~
+
+Now you have an image where you can run commands within a container
+managed by Docker.
+
+.. code-block:: ruby
+
+ docker_container 'samalba/docker-registry' do
+ detach true
+ port '5000:5000'
+ env 'SETTINGS_FLAVOR=local'
+ volume '/mnt/docker:/docker-storage'
+ end
+
+This is equivalent to running the following command, but under upstart:
+
+.. code-block:: bash
+
+ docker run --detach=true --publish='5000:5000' --env='SETTINGS_FLAVOR=local' --volume='/mnt/docker:/docker-storage' samalba/docker-registry
+
+The resources will accept a single string or an array of values
+for any docker flags that allow multiple values.
diff --git a/docs/sources/use/host_integration.rst b/docs/sources/use/host_integration.rst
index ed341cd4bc..cb920a5908 100644
--- a/docs/sources/use/host_integration.rst
+++ b/docs/sources/use/host_integration.rst
@@ -43,11 +43,6 @@ into it:
stop on runlevel [!2345]
respawn
script
- # Wait for docker to finish starting up first.
- FILE=/var/run/docker.sock
- while [ ! -e $FILE ] ; do
- inotifywait -t 2 -e create $(dirname $FILE)
- done
/usr/bin/docker start -a redis_server
end script
diff --git a/docs/sources/use/index.rst b/docs/sources/use/index.rst
index c1b7691cca..dcf6289b41 100644
--- a/docs/sources/use/index.rst
+++ b/docs/sources/use/index.rst
@@ -20,4 +20,5 @@ Contents:
working_with_volumes
working_with_links_names
ambassador_pattern_linking
+ chef
puppet
diff --git a/docs/sources/use/networking.rst b/docs/sources/use/networking.rst
index c00c608550..59c63ed674 100644
--- a/docs/sources/use/networking.rst
+++ b/docs/sources/use/networking.rst
@@ -121,8 +121,8 @@ Container intercommunication
The value of the Docker daemon's ``icc`` parameter determines whether
containers can communicate with each other over the bridge network.
-- The default, ``-icc=true`` allows containers to communicate with each other.
-- ``-icc=false`` means containers are isolated from each other.
+- The default, ``--icc=true`` allows containers to communicate with each other.
+- ``--icc=false`` means containers are isolated from each other.
Docker uses ``iptables`` under the hood to either accept or
drop communication between containers.
diff --git a/docs/sources/use/port_redirection.rst b/docs/sources/use/port_redirection.rst
index 38d6b98841..cf5c2100a9 100644
--- a/docs/sources/use/port_redirection.rst
+++ b/docs/sources/use/port_redirection.rst
@@ -114,21 +114,21 @@ exposure, is possible because ``client`` is started after ``server``
has been started.
Here is a full example. On ``server``, the port of interest is
-exposed. The exposure is done either through the ``-expose`` parameter
+exposed. The exposure is done either through the ``--expose`` parameter
to the ``docker run`` command, or the ``EXPOSE`` build command in a
Dockerfile:
.. code-block:: bash
# Expose port 80
- docker run -expose 80 --name server <image> <cmd>
+ docker run --expose 80 --name server <image> <cmd>
The ``client`` then links to the ``server``:
.. code-block:: bash
# Link
- docker run -name client -link server:linked-server <image> <cmd>
+ docker run --name client --link server:linked-server <image> <cmd>
``client`` locally refers to ``server`` as ``linked-server``. The
following environment variables, among others, are available on
diff --git a/docs/sources/use/working_with_links_names.rst b/docs/sources/use/working_with_links_names.rst
index 1b0e9f6914..4acb6079c1 100644
--- a/docs/sources/use/working_with_links_names.rst
+++ b/docs/sources/use/working_with_links_names.rst
@@ -19,14 +19,14 @@ Container Naming
.. versionadded:: v0.6.5
-You can now name your container by using the ``-name`` flag. If no
+You can now name your container by using the ``--name`` flag. If no
name is provided, Docker will automatically generate a name. You can
see this name using the ``docker ps`` command.
.. code-block:: bash
- # format is "sudo docker run -name <container_name> <image_name> <command>"
- $ sudo docker run -name test ubuntu /bin/bash
+ # format is "sudo docker run --name <container_name> <image_name> <command>"
+ $ sudo docker run --name test ubuntu /bin/bash
# the flag "-a" Show all containers. Only running containers are shown by default.
$ sudo docker ps -a
@@ -41,9 +41,9 @@ Links: service discovery for docker
.. versionadded:: v0.6.5
Links allow containers to discover and securely communicate with each
-other by using the flag ``-link name:alias``. Inter-container
+other by using the flag ``--link name:alias``. Inter-container
communication can be disabled with the daemon flag
-``-icc=false``. With this flag set to ``false``, Container A cannot
+``--icc=false``. With this flag set to ``false``, Container A cannot
access Container B unless explicitly allowed via a link. This is a
huge win for securing your containers. When two containers are linked
together Docker creates a parent child relationship between the
@@ -63,7 +63,7 @@ based on that image and run it as a daemon.
.. code-block:: bash
- $ sudo docker run -d -name redis crosbymichael/redis
+ $ sudo docker run -d --name redis crosbymichael/redis
We can issue all the commands that you would expect using the name
``redis``; start, stop, attach, using the name for our container. The
@@ -77,9 +77,9 @@ we need to establish a link.
.. code-block:: bash
- $ sudo docker run -t -i -link redis:db -name webapp ubuntu bash
+ $ sudo docker run -t -i --link redis:db --name webapp ubuntu bash
-When you specified ``-link redis:db`` you are telling Docker to link
+When you specified ``--link redis:db`` you are telling Docker to link
the container named ``redis`` into this new container with the alias
``db``. Environment variables are prefixed with the alias so that the
parent container can access network and environment information from
@@ -112,8 +112,16 @@ Accessing the network information along with the environment of the
child container allows us to easily connect to the Redis service on
the specific IP and port in the environment.
+.. note::
+ These Environment variables are only set for the first process in
+ the container. Similarly, some daemons (such as ``sshd``) will
+ scrub them when spawning shells for connection.
+
+ You can work around this by storing the initial ``env`` in a file,
+ or looking at ``/proc/1/environ``.
+
Running ``docker ps`` shows the 2 containers, and the ``webapp/db``
-alias name for the redis container.
+alias name for the Redis container.
.. code-block:: bash
diff --git a/docs/sources/use/working_with_volumes.rst b/docs/sources/use/working_with_volumes.rst
index 755be009e3..d2f035dc84 100644
--- a/docs/sources/use/working_with_volumes.rst
+++ b/docs/sources/use/working_with_volumes.rst
@@ -42,14 +42,14 @@ two new volumes::
This command will create the new container with two new volumes that
exits instantly (``true`` is pretty much the smallest, simplest program
that you can run). Once created you can mount its volumes in any other
-container using the ``-volumes-from`` option; irrespective of whether the
+container using the ``--volumes-from`` option; irrespective of whether the
container is running or not.
Or, you can use the VOLUME instruction in a Dockerfile to add one or more new
volumes to any container created from that image::
# BUILD-USING: docker build -t data .
- # RUN-USING: docker run -name DATA data
+ # RUN-USING: docker run --name DATA data
FROM busybox
VOLUME ["/var/volume1", "/var/volume2"]
CMD ["/bin/true"]
@@ -63,19 +63,19 @@ Data Volume Container, and then to mount the data from it.
Create a named container with volumes to share (``/var/volume1`` and ``/var/volume2``)::
- $ docker run -v /var/volume1 -v /var/volume2 -name DATA busybox true
+ $ docker run -v /var/volume1 -v /var/volume2 --name DATA busybox true
Then mount those data volumes into your application containers::
- $ docker run -t -i -rm -volumes-from DATA -name client1 ubuntu bash
+ $ docker run -t -i --rm --volumes-from DATA --name client1 ubuntu bash
-You can use multiple ``-volumes-from`` parameters to bring together multiple
+You can use multiple ``--volumes-from`` parameters to bring together multiple
data volumes from multiple containers.
Interestingly, you can mount the volumes that came from the ``DATA`` container in
yet another container via the ``client1`` middleman container::
- $ docker run -t -i -rm -volumes-from client1 -name client2 ubuntu bash
+ $ docker run -t -i --rm --volumes-from client1 --name client2 ubuntu bash
This allows you to abstract the actual data source from users of that data,
similar to :ref:`ambassador_pattern_linking <ambassador_pattern_linking>`.
@@ -129,9 +129,9 @@ because they are external to images.
Instead you can use ``--volumes-from`` to start a new container that can access the
data-container's volume. For example::
- $ sudo docker run -rm --volumes-from DATA -v $(pwd):/backup busybox tar cvf /backup/backup.tar /data
+ $ sudo docker run --rm --volumes-from DATA -v $(pwd):/backup busybox tar cvf /backup/backup.tar /data
-* ``-rm`` - remove the container when it exits
+* ``--rm`` - remove the container when it exits
* ``--volumes-from DATA`` - attach to the volumes shared by the ``DATA`` container
* ``-v $(pwd):/backup`` - bind mount the current directory into the container; to write the tar file to
* ``busybox`` - a small simpler image - good for quick maintenance
@@ -140,13 +140,13 @@ data-container's volume. For example::
Then to restore to the same container, or another that you've made elsewhere::
# create a new data container
- $ sudo docker run -v /data -name DATA2 busybox true
+ $ sudo docker run -v /data --name DATA2 busybox true
# untar the backup files into the new container's data volume
- $ sudo docker run -rm --volumes-from DATA2 -v $(pwd):/backup busybox tar xvf /backup/backup.tar
+ $ sudo docker run --rm --volumes-from DATA2 -v $(pwd):/backup busybox tar xvf /backup/backup.tar
data/
data/sven.txt
# compare to the original container
- $ sudo docker run -rm --volumes-from DATA -v `pwd`:/backup busybox ls /data
+ $ sudo docker run --rm --volumes-from DATA -v `pwd`:/backup busybox ls /data
sven.txt
diff --git a/docs/sources/use/workingwithrepository.rst b/docs/sources/use/workingwithrepository.rst
index cbde932cde..c126361f8c 100644
--- a/docs/sources/use/workingwithrepository.rst
+++ b/docs/sources/use/workingwithrepository.rst
@@ -74,7 +74,7 @@ name or description:
Search the docker index for images
- -notrunc=false: Don't truncate output
+ --no-trunc=false: Don't truncate output
$ sudo docker search centos
Found 25 results matching your query ("centos")
NAME DESCRIPTION