Added code and color for 'note' and updated the hello world note.
This commit is contained in:
parent
a7299a3f26
commit
2832ea0cfe
6 changed files with 98 additions and 18 deletions
|
@ -40,3 +40,35 @@ Notes
|
|||
So changes to those pages should be made directly in html
|
||||
* For the template the css is compiled from less. When changes are needed they can be compiled using
|
||||
lessc ``lessc main.less`` or watched using watch-lessc ``watch-lessc -i main.less -o main.css``
|
||||
|
||||
|
||||
Guides on using sphinx
|
||||
----------------------
|
||||
* To make links to certain pages create a link target like so:
|
||||
|
||||
```
|
||||
.. _hello_world:
|
||||
|
||||
Hello world
|
||||
===========
|
||||
|
||||
This is.. (etc.)
|
||||
```
|
||||
|
||||
The ``_hello_world:`` will make it possible to link to this position (page and marker) from all other pages.
|
||||
|
||||
* Notes, warnings and alarms
|
||||
|
||||
```
|
||||
# a note (use when something is important)
|
||||
.. note::
|
||||
|
||||
# a warning (orange)
|
||||
.. warning::
|
||||
|
||||
# danger (red, use sparsely)
|
||||
.. danger::
|
||||
|
||||
* Code examples
|
||||
|
||||
Start without $, so it's easy to copy and paste.
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
.. warning::
|
||||
.. note::
|
||||
|
||||
This example assumes that you have Docker running in daemon mode. For more information please see :ref:`running_examples`
|
||||
This example assumes you have Docker running in daemon mode. For more information please see :ref:`running_examples`
|
||||
|
|
|
@ -9,7 +9,7 @@ Hello World
|
|||
|
||||
.. include:: example_header.inc
|
||||
|
||||
This is the most basic example available for using Docker. The example assumes you have Docker installed.
|
||||
This is the most basic example available for using Docker.
|
||||
|
||||
Download the base container
|
||||
|
||||
|
|
|
@ -7,26 +7,27 @@
|
|||
Running The Examples
|
||||
--------------------
|
||||
|
||||
There are two ways to run docker, daemon and standalone mode.
|
||||
There are two ways to run docker, daemon mode 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.
|
||||
When you run the docker command it will first check if there is a docker daemon running in the background it can connect to.
|
||||
|
||||
If there is no daemon then docker will run in standalone mode.
|
||||
* If it exists it will use that daemon to run all of the commands.
|
||||
* If it does not exist docker will run in standalone mode (docker will exit after each command).
|
||||
|
||||
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.
|
||||
Docker needs to be run from a privileged account (root).
|
||||
|
||||
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.
|
||||
1. The most common (and recommended) 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 &
|
||||
sudo docker -d &
|
||||
|
||||
# now you can run docker commands from any account.
|
||||
$ docker <command>
|
||||
docker <command>
|
||||
|
||||
2. Standalone: You need to run every command as root, or using sudo
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ sudo docker <command>
|
||||
sudo docker <command>
|
||||
|
|
23
docs/theme/docker/static/css/main.css
vendored
23
docs/theme/docker/static/css/main.css
vendored
|
@ -82,7 +82,7 @@ h4 {
|
|||
.btn-custom {
|
||||
background-color: #292929 !important;
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:dximagetransform.microsoft.gradient(startColorstr="#515151", endColorstr="#282828");
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#515151", endColorstr="#282828");
|
||||
background-image: -khtml-gradient(linear, left top, left bottom, from(#515151), to(#282828));
|
||||
background-image: -moz-linear-gradient(top, #515151, #282828);
|
||||
background-image: -ms-linear-gradient(top, #515151, #282828);
|
||||
|
@ -131,6 +131,27 @@ section.header {
|
|||
margin: 15px 15px 15px 0;
|
||||
border: 2px solid gray;
|
||||
}
|
||||
.admonition {
|
||||
padding: 10px;
|
||||
border: 1px solid grey;
|
||||
margin-bottom: 10px;
|
||||
margin-top: 10px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.admonition .admonition-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
.admonition.note {
|
||||
background-color: #f1ebba;
|
||||
}
|
||||
.admonition.warning {
|
||||
background-color: #eed9af;
|
||||
}
|
||||
.admonition.danger {
|
||||
background-color: #e9bcab;
|
||||
}
|
||||
/* ===================
|
||||
left navigation
|
||||
===================== */
|
||||
|
|
26
docs/theme/docker/static/css/main.less
vendored
26
docs/theme/docker/static/css/main.less
vendored
|
@ -179,7 +179,33 @@ section.header {
|
|||
border: 2px solid gray;
|
||||
}
|
||||
|
||||
.admonition {
|
||||
padding: 10px;
|
||||
border: 1px solid grey;
|
||||
|
||||
margin-bottom: 10px;
|
||||
margin-top: 10px;
|
||||
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.admonition .admonition-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.admonition.note {
|
||||
background-color: rgb(241, 235, 186);
|
||||
}
|
||||
|
||||
.admonition.warning {
|
||||
background-color: rgb(238, 217, 175);
|
||||
}
|
||||
|
||||
.admonition.danger {
|
||||
background-color: rgb(233, 188, 171);
|
||||
}
|
||||
|
||||
/* ===================
|
||||
left navigation
|
||||
|
|
Loading…
Reference in a new issue