From 81ebf4fcf6fe3521c606b5abcbe151176c51aca9 Mon Sep 17 00:00:00 2001 From: Ken Cochrane Date: Sun, 7 Apr 2013 10:21:08 -0400 Subject: [PATCH] made a new running the examples page, and added a link to the top of each example to the page to show people how to run them. --- docs/sources/examples/example_header.inc | 4 +++ docs/sources/examples/running_examples.rst | 32 ++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 docs/sources/examples/example_header.inc create mode 100644 docs/sources/examples/running_examples.rst diff --git a/docs/sources/examples/example_header.inc b/docs/sources/examples/example_header.inc new file mode 100644 index 0000000000..e7fbc42fc3 --- /dev/null +++ b/docs/sources/examples/example_header.inc @@ -0,0 +1,4 @@ + +.. warning:: + + This example assumes that you have Docker running in daemon mode. For more information please see :ref:`running_examples` \ No newline at end of file diff --git a/docs/sources/examples/running_examples.rst b/docs/sources/examples/running_examples.rst new file mode 100644 index 0000000000..222c22982d --- /dev/null +++ b/docs/sources/examples/running_examples.rst @@ -0,0 +1,32 @@ +:title: Running the Examples +:description: An overview on how to run the docker examples +:keywords: docker, examples, how to + +.. _running_examples: + +Running The Examples +-------------------- + +There are two ways to run docker, daemon and standalone mode. + +When you run the docker command it will first check to see if there is already a docker daemon running in the background it can connect too, and if so, it will use that daemon to run all of the commands. + +If there is no daemon then docker will run in standalone mode. + +Docker needs to be run from a privileged account (root). Depending on which mode you are using, will determine how you need to execute docker. + +1. The most common way is to run a docker daemon as root in the background, and then connect to it from the docker client from any account. + + .. code-block:: bash + + # starting docker daemon in the background + $ sudo docker -d & + + # now you can run docker commands from any account. + $ docker + +2. Standalone: You need to run every command as root, or using sudo + + .. code-block:: bash + + $ sudo docker