Browse code

Fix #1685: Notes on production use. General installation cleanup.

Andy Rothfusz authored on 2013/08/29 09:26:10
Showing 11 changed files
... ...
@@ -5,18 +5,20 @@
5 5
 Using Vagrant (Amazon EC2)
6 6
 ==========================
7 7
 
8
-This page explains how to setup and run an Amazon EC2 instance from your local machine. 
9
-Vagrant is not necessary to run Docker on EC2. You can follow the :ref:`ubuntu_linux` instructions
10
-installing Docker on any EC2 instance running Ubuntu
8
+This page explains how to setup and run an Amazon EC2 instance from
9
+your local machine.  **Vagrant is not necessary to run Docker on
10
+EC2.** You can follow the :ref:`ubuntu_linux` instructions installing
11
+Docker on any EC2 instance running Ubuntu.
11 12
 
12
-  Please note this is a community contributed installation path. The only 'official' installation is using the
13
-  :ref:`ubuntu_linux` installation path. This version may sometimes be out of date.
14
-  
15
-  
16 13
 Installation
17 14
 ------------
18 15
 
19
-Docker can now be installed on Amazon EC2 with a single vagrant command. Vagrant 1.1 or higher is required.
16
+.. include:: install_header.inc
17
+
18
+.. include:: install_unofficial.inc
19
+  
20
+Docker can now be installed on Amazon EC2 with a single vagrant
21
+command. Vagrant 1.1 or higher is required.
20 22
 
21 23
 1. Install vagrant from http://www.vagrantup.com/ (or use your package manager)
22 24
 2. Install the vagrant aws plugin
... ...
@@ -7,10 +7,6 @@
7 7
 Arch Linux
8 8
 ==========
9 9
 
10
-  Please note this is a community contributed installation path. The only 'official' installation is using the
11
-  :ref:`ubuntu_linux` installation path. This version may sometimes be out of date.
12
-
13
-
14 10
 Installing on Arch Linux is not officially supported but can be handled via 
15 11
 either of the following AUR packages:
16 12
 
... ...
@@ -36,6 +32,10 @@ either AUR package.
36 36
 Installation
37 37
 ------------
38 38
 
39
+.. include:: install_header.inc
40
+
41
+.. include:: install_unofficial.inc
42
+
39 43
 The instructions here assume **yaourt** is installed.  See 
40 44
 `Arch User Repository <https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages>`_
41 45
 for information on building and installing packages from the AUR if you have not
... ...
@@ -7,9 +7,10 @@
7 7
 Binaries
8 8
 ========
9 9
 
10
-  **Please note this project is currently under heavy development. It should not be used in production.**
10
+.. include:: install_header.inc
11 11
 
12
-**This instruction set is meant for hackers who want to try out Docker on a variety of environments.**
12
+**This instruction set is meant for hackers who want to try out Docker
13
+on a variety of environments.**
13 14
 
14 15
 Right now, the officially supported distributions are:
15 16
 
... ...
@@ -23,14 +24,10 @@ But we know people have had success running it under
23 23
 - Suse
24 24
 - :ref:`arch_linux`
25 25
 
26
+Check Your Kernel
27
+-----------------
26 28
 
27
-Dependencies:
28
-
29
-* 3.8 Kernel (read more about :ref:`kernel`)
30
-* AUFS filesystem support
31
-* lxc
32
-* xz-utils
29
+Your host's Linux kernel must meet the Docker :ref:`kernel`
33 30
 
34 31
 Get the docker binary:
35 32
 ----------------------
36 33
new file mode 100644
... ...
@@ -0,0 +1,7 @@
0
+
1
+.. note::
2
+
3
+   Docker is still under heavy development! We don't recommend using
4
+   it in production yet, but we're getting closer with each
5
+   release. Please see our blog post, `"Getting to Docker 1.0"
6
+   <http://blog.docker.io/2013/08/getting-to-docker-1-0/>`_
0 7
new file mode 100644
... ...
@@ -0,0 +1,7 @@
0
+
1
+.. note::
2
+
3
+   This is a community contributed installation path. The only
4
+   'official' installation is using the :ref:`ubuntu_linux`
5
+   installation path. This version may be out of date because it
6
+   depends on some binaries to be updated and published
... ...
@@ -6,21 +6,22 @@
6 6
 Rackspace Cloud
7 7
 ===============
8 8
 
9
-  Please note this is a community contributed installation path. The only 'official' installation is using the
10
-  :ref:`ubuntu_linux` installation path. This version may sometimes be out of date.
9
+.. include:: install_unofficial.inc
11 10
 
12
-
13
-Installing Docker on Ubuntu provided by Rackspace is pretty straightforward, and you should mostly be able to follow the
11
+Installing Docker on Ubuntu provided by Rackspace is pretty
12
+straightforward, and you should mostly be able to follow the
14 13
 :ref:`ubuntu_linux` installation guide.
15 14
 
16 15
 **However, there is one caveat:**
17 16
 
18
-If you are using any linux not already shipping with the 3.8 kernel you will need to install it. And this is a little
19
-more difficult on Rackspace.
17
+If you are using any linux not already shipping with the 3.8 kernel
18
+you will need to install it. And this is a little more difficult on
19
+Rackspace.
20 20
 
21
-Rackspace boots their servers using grub's menu.lst and does not like non 'virtual' packages (e.g. xen compatible)
22
-kernels there, although they do work. This makes ``update-grub`` to not have the expected result, and you need to
23
-set the kernel manually.
21
+Rackspace boots their servers using grub's ``menu.lst`` and does not
22
+like non 'virtual' packages (e.g. xen compatible) kernels there,
23
+although they do work. This makes ``update-grub`` to not have the
24
+expected result, and you need to set the kernel manually.
24 25
 
25 26
 **Do not attempt this on a production machine!**
26 27
 
... ...
@@ -33,7 +34,8 @@ set the kernel manually.
33 33
     apt-get install linux-generic-lts-raring
34 34
 
35 35
 
36
-Great, now you have kernel installed in /boot/, next is to make it boot next time.
36
+Great, now you have kernel installed in ``/boot/``, next is to make it
37
+boot next time.
37 38
 
38 39
 .. code-block:: bash
39 40
 
... ...
@@ -43,9 +45,10 @@ Great, now you have kernel installed in /boot/, next is to make it boot next tim
43 43
     # this should return some results
44 44
 
45 45
 
46
-Now you need to manually edit /boot/grub/menu.lst, you will find a section at the bottom with the existing options.
47
-Copy the top one and substitute the new kernel into that. Make sure the new kernel is on top, and double check kernel
48
-and initrd point to the right files.
46
+Now you need to manually edit ``/boot/grub/menu.lst``, you will find a
47
+section at the bottom with the existing options.  Copy the top one and
48
+substitute the new kernel into that. Make sure the new kernel is on
49
+top, and double check kernel and initrd point to the right files.
49 50
 
50 51
 Make special care to double check the kernel and initrd entries.
51 52
 
... ...
@@ -92,4 +95,4 @@ Verify the kernel was updated
92 92
     # nice! 3.8.
93 93
 
94 94
 
95
-Now you can finish with the :ref:`ubuntu_linux` instructions.
96 95
\ No newline at end of file
96
+Now you can finish with the :ref:`ubuntu_linux` instructions.
... ...
@@ -2,15 +2,17 @@
2 2
 :description: Please note this project is currently under heavy development. It should not be used in production.
3 3
 :keywords: Docker, Docker documentation, requirements, virtualbox, vagrant, git, ssh, putty, cygwin, linux
4 4
 
5
-**These instructions have changed for 0.6. If you are upgrading from an earlier version, you will need to follow them again.**
6
-
7 5
 .. _ubuntu_linux:
8 6
 
9 7
 Ubuntu Linux
10 8
 ============
11 9
 
12
-   **Please note this project is currently under heavy development. It should not be used in production.**
10
+.. warning::
11
+
12
+   These instructions have changed for 0.6. If you are upgrading from
13
+   an earlier version, you will need to follow them again.
13 14
 
15
+.. include:: install_header.inc
14 16
 
15 17
 Right now, the officially supported distribution are:
16 18
 
... ...
@@ -22,7 +24,8 @@ Docker has the following dependencies
22 22
 * Linux kernel 3.8 (read more about :ref:`kernel`)
23 23
 * AUFS file system support (we are working on BTRFS support as an alternative)
24 24
 
25
-Please read :ref:`ufw`, if you plan to use `UFW (Uncomplicated Firewall) <https://help.ubuntu.com/community/UFW>`_
25
+Please read :ref:`ufw`, if you plan to use `UFW (Uncomplicated
26
+Firewall) <https://help.ubuntu.com/community/UFW>`_
26 27
 
27 28
 .. _ubuntu_precise:
28 29
 
... ...
@@ -38,12 +41,13 @@ Dependencies
38 38
 **Linux kernel 3.8**
39 39
 
40 40
 Due to a bug in LXC, docker works best on the 3.8 kernel. Precise
41
-comes with a 3.2 kernel, so we need to upgrade it. The kernel you'll install when following these steps
42
-comes with AUFS built in. We also include the generic headers
43
-to enable packages that depend on them, like ZFS and the VirtualBox
44
-guest additions. If you didn't install the headers for your "precise"
45
-kernel, then you can skip these headers for the "raring" kernel. But
46
-it is safer to include them if you're not sure.
41
+comes with a 3.2 kernel, so we need to upgrade it. The kernel you'll
42
+install when following these steps comes with AUFS built in. We also
43
+include the generic headers to enable packages that depend on them,
44
+like ZFS and the VirtualBox guest additions. If you didn't install the
45
+headers for your "precise" kernel, then you can skip these headers for
46
+the "raring" kernel. But it is safer to include them if you're not
47
+sure.
47 48
 
48 49
 
49 50
 .. code-block:: bash
... ...
@@ -59,10 +63,13 @@ it is safer to include them if you're not sure.
59 59
 Installation
60 60
 ------------
61 61
 
62
+.. warning::
63
+
64
+   These instructions have changed for 0.6. If you are upgrading from
65
+   an earlier version, you will need to follow them again.
66
+
62 67
 Docker is available as a Debian package, which makes installation easy.
63 68
 
64
-*Please note that these instructions have changed for 0.6. If you are upgrading from an earlier version, you will need
65
-to follow them again.*
66 69
 
67 70
 .. code-block:: bash
68 71
 
... ...
@@ -136,7 +143,8 @@ Verify it worked
136 136
 
137 137
 .. code-block:: bash
138 138
 
139
-   # download the base 'ubuntu' container and run bash inside it while setting up an interactive shell
139
+   # download the base 'ubuntu' container
140
+   # and run bash inside it while setting up an interactive shell
140 141
    sudo docker run -i -t ubuntu /bin/bash
141 142
 
142 143
    # type exit to exit
... ...
@@ -150,7 +158,8 @@ Verify it worked
150 150
 Docker and UFW
151 151
 ^^^^^^^^^^^^^^
152 152
 
153
-Docker uses a bridge to manage containers networking, by default UFW drop all `forwarding`, a first step is to enable forwarding:
153
+Docker uses a bridge to manage containers networking, by default UFW
154
+drop all `forwarding`, a first step is to enable forwarding:
154 155
 
155 156
 .. code-block:: bash
156 157
 
... ...
@@ -168,8 +177,9 @@ Then reload UFW:
168 168
    sudo ufw reload
169 169
 
170 170
 
171
-UFW's default set of rules denied all `incoming`, so if you want to be able to reach your containers from another host,
172
-you should allow incoming connections on the docker port (default 4243):
171
+UFW's default set of rules denied all `incoming`, so if you want to be
172
+able to reach your containers from another host, you should allow
173
+incoming connections on the docker port (default 4243):
173 174
 
174 175
 .. code-block:: bash
175 176
 
... ...
@@ -5,18 +5,32 @@
5 5
 .. _upgrading:
6 6
 
7 7
 Upgrading
8
-============
8
+=========
9 9
 
10
-**These instructions are for upgrading Docker**
10
+The technique for upgrading ``docker`` to a newer version depends on
11
+how you installed ``docker``.
11 12
 
13
+.. versionadded:: 0.5.3
14
+   You may wish to add a ``docker`` group to your system to avoid using sudo with ``docker``. (see :ref:`dockergroup`)
12 15
 
13
-After normal installation
14 16
 
15
-If you installed Docker normally using apt-get or used Vagrant, use apt-get to upgrade.
17
+After ``apt-get``
18
+-----------------
19
+
20
+If you installed Docker using ``apt-get`` or Vagrant, then you should
21
+use ``apt-get`` to upgrade.
22
+
23
+.. versionadded:: 0.6
24
+   Add Docker repository information to your system first.
16 25
 
17 26
 .. code-block:: bash
18 27
 
28
+   # Add the Docker repository key to your local keychain
29
+   sudo sh -c "curl https://get.docker.io/gpg | apt-key add -"
30
+
31
+   # Add the Docker repository to your apt sources list.
32
+   sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
33
+
19 34
    # update your sources list
20 35
    sudo apt-get update
21 36
 
... ...
@@ -27,7 +41,7 @@ If you installed Docker normally using apt-get or used Vagrant, use apt-get to u
27 27
 After manual installation
28 28
 -------------------------
29 29
 
30
-If you installed the Docker binary
30
+If you installed the Docker :ref:`binaries` then follow these steps:
31 31
 
32 32
 
33 33
 .. code-block:: bash
... ...
@@ -48,8 +62,10 @@ If you installed the Docker binary
48 48
    tar -xf docker-latest.tgz
49 49
 
50 50
 
51
-Start docker in daemon mode (-d) and disconnect (&) starting ./docker will start the version in your current dir rather than a version which
52
-might reside in your path.
51
+Start docker in daemon mode (``-d``) and disconnect, running the
52
+daemon in the background (``&``). Starting as ``./docker`` guarantees
53
+to run the version in your current directory rather than a version
54
+which might reside in your path.
53 55
 
54 56
 .. code-block:: bash
55 57
 
... ...
@@ -2,31 +2,36 @@
2 2
 :description: This guide will setup a new virtualbox virtual machine with docker installed on your computer.
3 3
 :keywords: Docker, Docker documentation, virtualbox, vagrant, git, ssh, putty, cygwin
4 4
 
5
-**Vagrant installation is temporarily out of date, it will be updated for 0.6 soon.**
6
-
7 5
 .. _install_using_vagrant:
8 6
 
9 7
 Using Vagrant (Mac, Linux)
10 8
 ==========================
11 9
 
12
-This guide will setup a new virtualbox virtual machine with docker installed on your computer. This works on most operating
13
-systems, including MacOX, Windows, Linux, FreeBSD and others. If you can install these and have at least 400Mb RAM
14
-to spare you should be good.
15
-
10
+This guide will setup a new virtualbox virtual machine with docker
11
+installed on your computer. This works on most operating systems,
12
+including MacOX, Windows, Linux, FreeBSD and others. If you can
13
+install these and have at least 400Mb RAM to spare you should be good.
16 14
 
17 15
 Install Vagrant and Virtualbox
18 16
 ------------------------------
19 17
 
20
-1. Install virtualbox from https://www.virtualbox.org/ (or use your package manager)
21
-2. Install vagrant from http://www.vagrantup.com/ (or use your package manager)
22
-3. Install git if you had not installed it before, check if it is installed by running
23
-   ``git`` in a terminal window
18
+.. include:: install_header.inc
19
+
20
+.. include:: install_unofficial.inc
21
+
22
+#. Install virtualbox from https://www.virtualbox.org/ (or use your
23
+   package manager)
24
+#. Install vagrant from http://www.vagrantup.com/ (or use your package
25
+   manager)
26
+#. Install git if you had not installed it before, check if it is
27
+   installed by running ``git`` in a terminal window
24 28
 
25 29
 
26 30
 Spin it up
27 31
 ----------
28 32
 
29
-1. Fetch the docker sources (this includes the Vagrantfile for machine setup).
33
+1. Fetch the docker sources (this includes the ``Vagrantfile`` for
34
+   machine setup).
30 35
 
31 36
    .. code-block:: bash
32 37
 
... ...
@@ -2,20 +2,20 @@
2 2
 :description: Docker's tutorial to run docker on Windows
3 3
 :keywords: Docker, Docker documentation, Windows, requirements, virtualbox, vagrant, git, ssh, putty, cygwin
4 4
 
5
-**Vagrant installation is temporarily out of date, it will be updated for 0.6 soon.**
6
-
7 5
 .. _windows:
8 6
 
9 7
 Using Vagrant (Windows)
10 8
 =======================
11 9
 
12
-  Please note this is a community contributed installation path. The only 'official' installation is using the :ref:`ubuntu_linux` installation path. This version
13
-  may be out of date because it depends on some binaries to be updated and published
10
+Docker can run on Windows using a VM like VirtualBox. You then run
11
+Linux within the VM.
14 12
 
13
+Installation
14
+------------
15 15
 
16
+.. include:: install_header.inc
16 17
 
17
-Requirements
18
+.. include:: install_unofficial.inc
18 19
 
19 20
 1. Install virtualbox from https://www.virtualbox.org - or follow this tutorial__
20 21
 
... ...
@@ -35,7 +35,10 @@ We recommend having at least 2Gb of free disk space and 2Gb of RAM (or more).
35 35
 Opening a command prompt
36 36
 ------------------------
37 37
 
38
-First open a cmd prompt. Press Windows key and then press “R” key. This will open the RUN dialog box for you. Type “cmd” and press Enter. Or you can click on Start, type “cmd” in the “Search programs and files” field, and click on cmd.exe.
38
+First open a cmd prompt. Press Windows key and then press “R”
39
+key. This will open the RUN dialog box for you. Type “cmd” and press
40
+Enter. Or you can click on Start, type “cmd” in the “Search programs
41
+and files” field, and click on cmd.exe.
39 42
 
40 43
 .. image:: images/win/_01.gif
41 44
    :alt: Git install
... ...
@@ -47,14 +50,17 @@ This should open a cmd prompt window.
47 47
    :alt: run docker
48 48
    :align: center
49 49
 
50
-Alternatively, you can also use a Cygwin terminal, or Git Bash (or any other command line program you are usually using). The next steps would be the same.
50
+Alternatively, you can also use a Cygwin terminal, or Git Bash (or any
51
+other command line program you are usually using). The next steps
52
+would be the same.
51 53
 
52 54
 .. _launch_ubuntu:
53 55
 
54 56
 Launch an Ubuntu virtual server
55 57
 -------------------------------
56 58
 
57
-Let’s download and run an Ubuntu image with docker binaries already installed.
59
+Let’s download and run an Ubuntu image with docker binaries already
60
+installed.
58 61
 
59 62
 .. code-block:: bash
60 63
 
... ...
@@ -66,7 +72,9 @@ Let’s download and run an Ubuntu image with docker binaries already installed.
66 66
    :alt: run docker
67 67
    :align: center
68 68
 
69
-Congratulations! You are running an Ubuntu server with docker installed on it. You do not see it though, because it is running in the background.
69
+Congratulations! You are running an Ubuntu server with docker
70
+installed on it. You do not see it though, because it is running in
71
+the background.
70 72
 
71 73
 Log onto your Ubuntu server
72 74
 ---------------------------
... ...
@@ -85,7 +93,12 @@ Run the following command
85 85
 
86 86
 	vagrant ssh
87 87
 
88
-You may see an error message starting with “`ssh` executable not found”. In this case it means that you do not have SSH in your PATH. If you do not have SSH in your PATH you can set it up with the “set” command. For instance, if your ssh.exe is in the folder named “C:\Program Files (x86)\Git\bin”, then you can run the following command:
88
+You may see an error message starting with “`ssh` executable not
89
+found”. In this case it means that you do not have SSH in your
90
+PATH. If you do not have SSH in your PATH you can set it up with the
91
+“set” command. For instance, if your ssh.exe is in the folder named
92
+“C:\Program Files (x86)\Git\bin”, then you can run the following
93
+command:
89 94
 
90 95
 .. code-block:: bash
91 96
 
... ...
@@ -104,13 +117,16 @@ First step is to get the IP and port of your Ubuntu server. Simply run:
104 104
 
105 105
 	vagrant ssh-config 
106 106
 
107
-You should see an output with HostName and Port information. In this example, HostName is 127.0.0.1 and port is 2222. And the User is “vagrant”. The password is not shown, but it is also “vagrant”.
107
+You should see an output with HostName and Port information. In this
108
+example, HostName is 127.0.0.1 and port is 2222. And the User is
109
+“vagrant”. The password is not shown, but it is also “vagrant”.
108 110
 
109 111
 .. image:: images/win/ssh-config.gif
110 112
    :alt: run docker
111 113
    :align: center
112 114
 
113
-You can now use this information for connecting via SSH to your server. To do so you can:
115
+You can now use this information for connecting via SSH to your
116
+server. To do so you can:
114 117
 
115 118
 - Use putty.exe OR
116 119
 - Use SSH from a terminal
... ...
@@ -118,8 +134,9 @@ You can now use this information for connecting via SSH to your server. To do so
118 118
 Use putty.exe
119 119
 '''''''''''''
120 120
 
121
-You can download putty.exe from this page http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
122
-Launch putty.exe and simply enter the information you got from last step.
121
+You can download putty.exe from this page
122
+http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Launch
123
+putty.exe and simply enter the information you got from last step.
123 124
 
124 125
 .. image:: images/win/putty.gif
125 126
    :alt: run docker
... ...
@@ -134,7 +151,9 @@ Open, and enter user = vagrant and password = vagrant.
134 134
 SSH from a terminal
135 135
 '''''''''''''''''''
136 136
 
137
-You can also run this command on your favorite terminal (windows prompt, cygwin, git-bash, …). Make sure to adapt the IP and port from what you got from the vagrant ssh-config command.
137
+You can also run this command on your favorite terminal (windows
138
+prompt, cygwin, git-bash, …). Make sure to adapt the IP and port from
139
+what you got from the vagrant ssh-config command.
138 140
 
139 141
 .. code-block:: bash
140 142
 
... ...
@@ -146,12 +165,14 @@ Enter user = vagrant and password = vagrant.
146 146
    :alt: run docker
147 147
    :align: center
148 148
 
149
-Congratulations, you are now logged onto your Ubuntu Server, running on top of your Windows machine !
149
+Congratulations, you are now logged onto your Ubuntu Server, running
150
+on top of your Windows machine !
150 151
 
151 152
 Running Docker
152 153
 --------------
153 154
 
154
-First you have to be root in order to run docker. Simply run the following command:
155
+First you have to be root in order to run docker. Simply run the
156
+following command:
155 157
 
156 158
 .. code-block:: bash
157 159
 
... ...
@@ -179,10 +200,11 @@ VM does not boot
179 179
 
180 180
 .. image:: images/win/ts_go_bios.JPG
181 181
 
182
-If you run into this error message "The VM failed to remain in the 'running'
183
-state while attempting to boot", please check that your computer has virtualization
184
-technology available and activated by going to the BIOS. Here's an example for an HP
185
-computer (System configuration / Device configuration)
182
+If you run into this error message "The VM failed to remain in the
183
+'running' state while attempting to boot", please check that your
184
+computer has virtualization technology available and activated by
185
+going to the BIOS. Here's an example for an HP computer (System
186
+configuration / Device configuration)
186 187
 
187 188
 .. image:: images/win/hp_bios_vm.JPG
188 189
 
... ...
@@ -192,5 +214,6 @@ Docker is not installed
192 192
 
193 193
 .. image:: images/win/ts_no_docker.JPG
194 194
 
195
-If you run into this error message "The program 'docker' is currently not installed",
196
-try deleting the docker folder and restart from :ref:`launch_ubuntu`
195
+If you run into this error message "The program 'docker' is currently
196
+not installed", try deleting the docker folder and restart from
197
+:ref:`launch_ubuntu`
... ...
@@ -37,6 +37,8 @@ Running an interactive shell
37 37
   # use the escape sequence Ctrl-p + Ctrl-q
38 38
   sudo docker run -i -t ubuntu /bin/bash
39 39
 
40
+.. _dockergroup:
41
+
40 42
 Why ``sudo``?
41 43
 -------------
42 44