-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request moby#347 from kencochrane/303_docs_fix
improved the example docs to help moby#303
- Loading branch information
Showing
7 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
.. warning:: | ||
|
||
This example assumes that you have Docker running in daemon mode. For more information please see :ref:`running_examples` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ Contents: | |
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
running_examples | ||
hello_world | ||
hello_world_daemon | ||
python_web_app | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <command> | ||
2. Standalone: You need to run every command as root, or using sudo | ||
|
||
.. code-block:: bash | ||
$ sudo docker <command> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
Create an ssh daemon service | ||
============================ | ||
|
||
|
||
.. include:: example_header.inc | ||
|
||
|
||
**Video:** | ||
|