Browse code

Added links to @jpetazzo 's kernel article, removed quote indents from puppet.rst

Thatcher Peskens authored on 2013/05/25 06:42:00
Showing 3 changed files
... ...
@@ -27,7 +27,7 @@ But we know people have had success running it under
27 27
 Dependencies:
28 28
 -------------
29 29
 
30
-* 3.8 Kernel
30
+* 3.8 Kernel (read more about :ref:`kernel`)
31 31
 * AUFS filesystem support
32 32
 * lxc
33 33
 * bsdtar
... ...
@@ -16,7 +16,7 @@ Right now, the officially supported distribution are:
16 16
 
17 17
 Docker has the following dependencies
18 18
 
19
-* Linux kernel 3.8
19
+* Linux kernel 3.8 (read more about :ref:`kernel`)
20 20
 * AUFS file system support (we are working on BTRFS support as an alternative)
21 21
 
22 22
 .. _ubuntu_precise:
... ...
@@ -25,9 +25,9 @@ Installation
25 25
 The module is available on the `Puppet Forge <https://forge.puppetlabs.com/garethr/docker/>`_
26 26
 and can be installed using the built-in module tool.
27 27
 
28
-   .. code-block:: bash
28
+.. code-block:: bash
29 29
 
30
-      puppet module install garethr/docker
30
+   puppet module install garethr/docker
31 31
 
32 32
 It can also be found on `GitHub <https://www.github.com/garethr/garethr-docker>`_ 
33 33
 if you would rather download the source.
... ...
@@ -41,9 +41,9 @@ for managing images and containers.
41 41
 Installation
42 42
 ~~~~~~~~~~~~
43 43
 
44
-   .. code-block:: ruby
44
+.. code-block:: ruby
45 45
 
46
-      include 'docker'
46
+  include 'docker'
47 47
 
48 48
 Images
49 49
 ~~~~~~
... ...
@@ -51,26 +51,26 @@ Images
51 51
 The next step is probably to install a docker image, for this we have a
52 52
 defined type which can be used like so:
53 53
 
54
-   .. code-block:: ruby
54
+.. code-block:: ruby
55 55
 
56
-      docker::image { 'base': }
56
+  docker::image { 'base': }
57 57
 
58 58
 This is equivalent to running:
59 59
 
60
-   .. code-block:: bash
60
+.. code-block:: bash
61 61
 
62
-      docker pull base
62
+  docker pull base
63 63
 
64 64
 Note that it will only if the image of that name does not already exist.
65 65
 This is downloading a large binary so on first run can take a while.
66 66
 For that reason this define turns off the default 5 minute timeout
67 67
 for exec. Note that you can also remove images you no longer need with:
68 68
 
69
-   .. code-block:: ruby
69
+.. code-block:: ruby
70 70
 
71
-      docker::image { 'base':
72
-        ensure => 'absent',
73
-      }
71
+  docker::image { 'base':
72
+    ensure => 'absent',
73
+  }
74 74
 
75 75
 Containers
76 76
 ~~~~~~~~~~
... ...
@@ -78,35 +78,35 @@ Containers
78 78
 Now you have an image you can run commands within a container managed by
79 79
 docker.
80 80
 
81
-   .. code-block:: ruby
81
+.. code-block:: ruby
82 82
 
83
-      docker::run { 'helloworld':
84
-        image   => 'base',
85
-        command => '/bin/sh -c "while true; do echo hello world; sleep 1; done"',
86
-      }
83
+  docker::run { 'helloworld':
84
+    image   => 'base',
85
+    command => '/bin/sh -c "while true; do echo hello world; sleep 1; done"',
86
+  }
87 87
 
88 88
 This is equivalent to running the following command, but under upstart:
89 89
 
90
-   .. code-block:: bash
90
+.. code-block:: bash
91 91
 
92
-      docker run -d base /bin/sh -c "while true; do echo hello world; sleep 1; done"
92
+  docker run -d base /bin/sh -c "while true; do echo hello world; sleep 1; done"
93 93
 
94 94
 Run also contains a number of optional parameters:
95 95
 
96
-   .. code-block:: ruby
97
-
98
-      docker::run { 'helloworld':
99
-        image        => 'base',
100
-        command      => '/bin/sh -c "while true; do echo hello world; sleep 1; done"',
101
-        ports        => ['4444', '4555'],
102
-        volumes      => ['/var/lib/counchdb', '/var/log'],
103
-        volumes_from => '6446ea52fbc9',
104
-        memory_limit => 10485760, # bytes 
105
-        username     => 'example',
106
-        hostname     => 'example.com',
107
-        env          => ['FOO=BAR', 'FOO2=BAR2'],
108
-        dns          => ['8.8.8.8', '8.8.4.4'],
109
-      }
96
+.. code-block:: ruby
97
+
98
+  docker::run { 'helloworld':
99
+    image        => 'base',
100
+    command      => '/bin/sh -c "while true; do echo hello world; sleep 1; done"',
101
+    ports        => ['4444', '4555'],
102
+    volumes      => ['/var/lib/counchdb', '/var/log'],
103
+    volumes_from => '6446ea52fbc9',
104
+    memory_limit => 10485760, # bytes
105
+    username     => 'example',
106
+    hostname     => 'example.com',
107
+    env          => ['FOO=BAR', 'FOO2=BAR2'],
108
+    dns          => ['8.8.8.8', '8.8.4.4'],
109
+  }
110 110
 
111 111
 Note that ports, env, dns and volumes can be set with either a single string
112 112
 or as above with an array of values.