Browse code

# This is a combination of 2 commits. # The first commit's message is:

Updating Ubuntu installation to use wget; eliminating elo

Signed-off-by: Mary Anthony <mary.anthony@docker.com>

# This is the 2nd commit message:

Adding in James comments

Signed-off-by: Mary Anthony <mary@docker.com>

Mary Anthony authored on 2015/03/13 07:23:56
Showing 2 changed files
... ...
@@ -31,24 +31,24 @@ pages:
31 31
 
32 32
 # Installation:
33 33
 - ['installation/index.md', '**HIDDEN**']
34
-- ['installation/mac.md', 'Installation', 'Mac OS X']
35 34
 - ['installation/ubuntulinux.md', 'Installation', 'Ubuntu']
36
-- ['installation/rhel.md', 'Installation', 'Red Hat Enterprise Linux']
37
-- ['installation/oracle.md', 'Installation', 'Oracle Linux']
35
+- ['installation/mac.md', 'Installation', 'Mac OS X']
36
+- ['installation/windows.md', 'Installation', 'Microsoft Windows']
37
+- ['installation/amazon.md', 'Installation', 'Amazon EC2']
38
+- ['installation/archlinux.md', 'Installation', 'Arch Linux']
39
+- ['installation/binaries.md', 'Installation', 'Binaries']
38 40
 - ['installation/centos.md', 'Installation', 'CentOS']
41
+- ['installation/cruxlinux.md', 'Installation', 'CRUX Linux']
39 42
 - ['installation/debian.md', 'Installation', 'Debian']
40
-- ['installation/gentoolinux.md', 'Installation', 'Gentoo']
43
+- ['installation/fedora.md', 'Installation', 'Fedora']
44
+- ['installation/frugalware.md', 'Installation', 'FrugalWare']
41 45
 - ['installation/google.md', 'Installation', 'Google Cloud Platform']
42
-- ['installation/rackspace.md', 'Installation', 'Rackspace Cloud']
43
-- ['installation/amazon.md', 'Installation', 'Amazon EC2']
46
+- ['installation/gentoolinux.md', 'Installation', 'Gentoo']
44 47
 - ['installation/softlayer.md', 'Installation', 'IBM Softlayer']
45
-- ['installation/archlinux.md', 'Installation', 'Arch Linux']
46
-- ['installation/frugalware.md', 'Installation', 'FrugalWare']
47
-- ['installation/fedora.md', 'Installation', 'Fedora']
48
+- ['installation/rackspace.md', 'Installation', 'Rackspace Cloud']
49
+- ['installation/rhel.md', 'Installation', 'Red Hat Enterprise Linux']
50
+- ['installation/oracle.md', 'Installation', 'Oracle Linux']
48 51
 - ['installation/SUSE.md', 'Installation', 'SUSE']
49
-- ['installation/cruxlinux.md', 'Installation', 'CRUX Linux']
50
-- ['installation/windows.md', 'Installation', 'Microsoft Windows']
51
-- ['installation/binaries.md', 'Installation', 'Binaries']
52 52
 - ['compose/install.md', 'Installation', 'Docker Compose']
53 53
 
54 54
 # User Guide:
... ...
@@ -187,3 +187,4 @@ pages:
187 187
 - ['project/get-help.md', 'Contributor Guide', 'Where to get help']
188 188
 - ['project/coding-style.md', 'Contributor Guide', 'Coding style guide']
189 189
 - ['project/doc-style.md', 'Contributor Guide', 'Documentation style guide']
190
+
... ...
@@ -1,395 +1,305 @@
1
-page_title: Installation on Ubuntu
2
-page_description: Instructions for installing Docker on Ubuntu.
1
+page_title: Installation on Ubuntu 
2
+page_description: Instructions for installing Docker on Ubuntu. 
3 3
 page_keywords: Docker, Docker documentation, requirements, virtualbox, installation, ubuntu
4 4
 
5
-# Ubuntu
5
+#Ubuntu
6 6
 
7
-Docker is supported on the following versions of Ubuntu:
7
+Docker is supported on these Ubuntu operating systems:
8 8
 
9
- - [*Ubuntu Trusty 14.04 (LTS) (64-bit)*](#ubuntu-trusty-1404-lts-64-bit)
10
- - [*Ubuntu Precise 12.04 (LTS) (64-bit)*](#ubuntu-precise-1204-lts-64-bit)
11
- - [*Ubuntu Raring 13.04 and Saucy 13.10 (64
12
-   bit)*](#ubuntu-raring-1304-and-saucy-1310-64-bit)
9
+- Ubuntu Trusty 14.04 (LTS) 
10
+- Ubuntu Precise 12.04 (LTS) 
11
+- Ubuntu Saucy 13.10
13 12
 
14
-Please read [*Docker and UFW*](#docker-and-ufw), if you plan to use [UFW
15
-(Uncomplicated Firewall)](https://help.ubuntu.com/community/UFW)
13
+This page instructs you to install using Docker-managed release packages and
14
+installation mechanisms. Using these packages ensures you get the latest release
15
+of Docker. If you wish to install using Ubuntu-managed packages, consult your
16
+Ubuntu documentation.
16 17
 
17
-## Ubuntu Trusty 14.04 (LTS) (64-bit)
18
+##Prerequisites
18 19
 
19
-Ubuntu Trusty comes with a 3.13.0 Linux kernel, and a `docker.io` package which
20
-installs Docker 1.0.1 and all its prerequisites from Ubuntu's repository.
20
+Docker requires a 64-bit installation regardless of your Ubuntu version.
21
+Additionally, your kernel must be 3.10 at minimum. The latest 3.10 minor version
22
+or a newer maintained version are also acceptable.
21 23
 
22
-> **Note**:
23
-> Ubuntu (and Debian) contain a much older KDE3/GNOME2 package called ``docker``, so the
24
-> Ubuntu-maintained package and executable are named ``docker.io``.
24
+Kernels older than 3.10 lack some of the features required to run Docker
25
+containers. These older versions are known to have bugs which cause data loss
26
+and frequently panic under certain conditions.
25 27
 
26
-### Ubuntu-maintained Package Installation
28
+To check your current kernel version, open a terminal and use `uname -r` to display
29
+your kernel version:
27 30
 
28
-To install the latest Ubuntu package (this is **not** the most recent Docker release):
31
+	$ uname -r 
32
+	3.11.0-15-generic
29 33
 
30
-    $ sudo apt-get update
31
-    $ sudo apt-get install docker.io
34
+>**Caution** Some Ubuntu OS versions **require a version higher than 3.10** to
35
+>run Docker, see the prerequisites on this page that apply to your Ubuntu
36
+>version.
32 37
 
33
-Then, to enable tab-completion of Docker commands in BASH, either restart BASH or:
38
+###For Trusty 14.04
34 39
 
35
-    $ source /etc/bash_completion.d/docker*
40
+There are no prerequisites for this version.
36 41
 
37
-> **Note**:
38
-> Since the Ubuntu package is quite dated at this point, you may want to use
39
-> the following section to install the most recent release of Docker.
40
-> If you install the Docker version, you do not need to install ``docker.io`` from Ubuntu.
42
+###For Precise 12.04 (LTS)
41 43
 
42
-### Docker-maintained Package Installation
44
+For Ubuntu Precise, Docker requires the 3.13 kernel version. If your kernel
45
+version is older than 3.13, you must upgrade it. Refer to this table to see
46
+which packages are required for your environment:
43 47
 
44
-If you'd like to try the latest version of Docker:
48
+<style type="text/css"> .tg  {border-collapse:collapse;border-spacing:0;} .tg
49
+td{font-size:14px;padding:10px
50
+5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
51
+.tg-031{width:275px;font-family:monospace} </style> <table class="tg"> <tr> <td
52
+class="tg-031">linux-image-generic-lts-trusty</td> <td class="tg-031e">Generic
53
+Linux kernel image. This kernel has AUFS built in. This is required to run
54
+Docker.</td> </tr> <tr> <td class="tg-031">linux-headers-generic-lts-trusty</td>
55
+<td class="tg-031e">Allows packages such as ZFS and VirtualBox guest additions
56
+which depend on them. If you didn't install the headers for your existing
57
+kernel, then you can skip these headers for the"trusty" kernel. If you're
58
+unsure, you should include this package for safety.</td> </tr> <tr> <td
59
+class="tg-031">xserver-xorg-lts-trusty</td> <td class="tg-031e"
60
+rowspan="2">Optional in non-graphical environments without Unity/Xorg.
61
+<i>Required</i> when running Docker on machine with a graphical environment.
45 62
 
46
-First, check that your APT system can deal with `https`
47
-URLs: the file `/usr/lib/apt/methods/https`
48
-should exist. If it doesn't, you need to install the package
49
-`apt-transport-https`.
63
+<p>To learn more about the reasons for these packages, read the installation
64
+instructions for backported kernels, specifically the <a
65
+href="https://wiki.ubuntu.com/Kernel/LTSEnablementStack" target="_blank">LTS
66
+Enablement Stack</a> &mdash; refer to note 5 under each version.</p></td> </tr>
67
+<tr> <td class="tg-031">libgl1-mesa-glx-lts-trusty</td> </tr> </table> &nbsp;
50 68
 
51
-    [ -e /usr/lib/apt/methods/https ] || {
52
-      apt-get update
53
-      apt-get install apt-transport-https
54
-    }
69
+To upgrade your kernel and install the additional packages, do the following:
55 70
 
56
-Then, add the Docker repository key to your local keychain.
71
+1. Open a terminal on your Ubuntu host.
57 72
 
58
-    $ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
73
+2. Update your package manager.
59 74
 
60
-Add the Docker repository to your apt sources list, update and install
61
-the `lxc-docker` package.
75
+		$ sudo apt-get update
62 76
 
63
-*You may receive a warning that the package isn't trusted. Answer yes to
64
-continue installation.*
77
+3. Install both the required and optional packages.
65 78
 
66
-    $ sudo sh -c "echo deb https://get.docker.com/ubuntu docker main\
67
-    > /etc/apt/sources.list.d/docker.list"
68
-    $ sudo apt-get update
69
-    $ sudo apt-get install lxc-docker
79
+		$ sudo apt-get install linux-image-generic-lts-trusty
70 80
 
71
-> **Note**:
72
->
73
-> There is also a simple `curl` script available to help with this process.
74
->
75
->     $ curl -sSL https://get.docker.com/ubuntu/ | sudo sh
81
+	Depending on your environment, you may install more as described in the preceding table.
76 82
 
77
-To verify that everything has worked as expected:
83
+4. Reboot your host.
78 84
 
79
-    $ sudo docker run -i -t ubuntu /bin/bash
85
+		$ sudo reboot
80 86
 
81
-Which should download the `ubuntu` image, and then start `bash` in a container.
87
+5. After your system reboots, go ahead and [install Docker](#installing-docker-on-ubuntu).
82 88
 
83
-Type `exit` to exit
84 89
 
85
-**Done!**, continue with the [User Guide](/userguide/).
90
+###For Saucy 13.10 (64 bit)
86 91
 
92
+Docker uses AUFS as the default storage backend. If you don't have this
93
+prerequisite installed, Docker's installation process adds it.
87 94
 
88
-## Ubuntu Precise 12.04 (LTS) (64-bit)
95
+##Installing Docker on Ubuntu
89 96
 
90
-This installation path should work at all times.
97
+Make sure you have intalled the prerequisites for your Ubuntu version. Then,
98
+install Docker using the following:
91 99
 
92
-### Dependencies
100
+1. Log into your Ubuntu installation as a user with `sudo` privileges.
93 101
 
94
-**Linux kernel 3.13**
102
+2. Verify that you have `wget` installed.
95 103
 
96
-For Ubuntu Precise, the currently recommended kernel version is 3.13.
97
-Ubuntu Precise installations with older kernels must be upgraded. The
98
-kernel you'll install when following these steps has AUFS built in.
99
-We also include the generic headers to enable packages that depend on them,
100
-like ZFS and the VirtualBox guest additions. If you didn't install the
101
-headers for your "precise" kernel, then you can skip these headers for the
102
-"trusty" kernel. If you're unsure, you should include the headers for safety.
104
+		$ which wget
103 105
 
104
-> **Warning**:
105
-> Kernels 3.8 and 3.11 are no longer supported by Canonical. Systems
106
-> running these kernels need to be updated using the instructions below.
107
-> Running Docker on these unsupported systems isn't supported either.
108
-> These old kernels are no longer patched for security vulnerabilities
109
-> and severe bugs which lead to data loss.
106
+	 If `wget` isn't installed, install it after updating your manager:
110 107
 
111
-Please read the installation instructions for backported kernels at
112
-Ubuntu.org to understand why you also need to install the Xorg packages
113
-when running Docker on a machine with a graphical environment like Unity.
114
-[LTS Enablement Stack](https://wiki.ubuntu.com/Kernel/LTSEnablementStack) refer to note 5 under
115
-each version.
108
+		$ sudo apt-get update $ sudo apt-get install wget
116 109
 
117
-    # install the backported kernel
118
-    $ sudo apt-get update
119
-    $ sudo apt-get install linux-image-generic-lts-trusty linux-headers-generic-lts-trusty
120
-    
121
-    # install the backported kernel and xorg if using Unity/Xorg
122
-    $ sudo apt-get install --install-recommends linux-generic-lts-trusty xserver-xorg-lts-trusty libgl1-mesa-glx-lts-trusty
110
+3. Get the latest Docker package.
123 111
 
124
-    # reboot
125
-    $ sudo reboot
112
+		$ wget -qO- https://get.docker.com/ | sh
126 113
 
127
-### Installation
114
+	 The system prompts you for your `sudo` password. Then, it downloads and
115
+	 installs Docker and its dependencies.
128 116
 
129
-> **Warning**: 
130
-> These instructions have changed for 0.6. If you are upgrading from an
131
-> earlier version, you will need to follow them again.
117
+4. Verify `docker` is installed correctly.
132 118
 
133
-Docker is available as a Debian package, which makes installation easy.
134
-**See the** [*Mirrors*](#mirrors) **section below if you are not
135
-in the United States.** Other sources of the Debian packages may be
136
-faster for you to install.
119
+		$ sudo docker run hello-world
137 120
 
138
-First, check that your APT system can deal with `https`
139
-URLs: the file `/usr/lib/apt/methods/https`
140
-should exist. If it doesn't, you need to install the package
141
-`apt-transport-https`.
121
+	This command downloads a test image and runs it in a container.
142 122
 
143
-    [ -e /usr/lib/apt/methods/https ] || {
144
-      apt-get update
145
-      apt-get install apt-transport-https
146
-    }
123
+## Optional Configurations for Docker on Ubuntu 
147 124
 
148
-Then, add the Docker repository key to your local keychain.
125
+This section contains optional procedures for configuring your Ubuntu to work
126
+better with Docker.
149 127
 
150
-    $ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
128
+* [Create a docker group](#create-a-docker-group) 
129
+* [Adjust memory and swap accounting](#adjust-memory-and-swap-accounting) 
130
+* [Enable UFW forwarding](#enable-ufw-forwarding) 
131
+* [Configure a DNS server for use by Docker](#configure-a-dns-server-for-docker)
151 132
 
152
-Add the Docker repository to your apt sources list, update and install
153
-the `lxc-docker` package.
133
+### Create a docker group		
154 134
 
155
-*You may receive a warning that the package isn't trusted. Answer yes to
156
-continue installation.*
135
+The `docker` daemon binds to a Unix socket instead of a TCP port. By default
136
+that Unix socket is owned by the user `root` and other users can access it with
137
+`sudo`. For this reason, `docker` daemon always runs as the `root` user.
157 138
 
158
-    $ sudo sh -c "echo deb https://get.docker.com/ubuntu docker main\
159
-    > /etc/apt/sources.list.d/docker.list"
160
-    $ sudo apt-get update
161
-    $ sudo apt-get install lxc-docker
139
+To avoid having to use `sudo` when you use the `docker` command, create a Unix
140
+group called `docker` and add users to it. When the `docker` daemon starts, it
141
+makes the ownership of the Unix socket read/writable by the `docker` group.
162 142
 
163
-> **Note**:
164
-> 
165
-> There is also a simple `curl` script available to help with this process.
166
-> 
167
->     $ curl -sSL https://get.docker.com/ubuntu/ | sudo sh
143
+>**Warning**: The `docker` group is equivalent to the `root` user; For details
144
+>on how this impacts security in your system, see [*Docker Daemon Attack
145
+>Surface*](/articles/security/#docker-daemon-attack-surface) for details.
168 146
 
169
-Now verify that the installation has worked by downloading the
170
-`ubuntu` image and launching a container.
147
+To create the `docker` group and add your user:
171 148
 
172
-    $ sudo docker run -i -t ubuntu /bin/bash
149
+1. Log into Ubuntu as a user with `sudo` privileges.
173 150
 
174
-Type `exit` to exit
151
+	 This procedure assumes you log in as the `ubuntu` user.
175 152
 
176
-**Done!**, continue with the [User Guide](/userguide/).
153
+3. Create the `docker` group and add your user.
177 154
 
178
-## Ubuntu Raring 13.04 and Saucy 13.10 (64 bit)
155
+		$ sudo usermod -aG docker ubuntu
179 156
 
180
-These instructions cover both Ubuntu Raring 13.04 and Saucy 13.10.
157
+3. Log out and log back in.
181 158
 
182
-### Dependencies
159
+	This ensures your user is running with the correct permissions.
183 160
 
184
-**Optional AUFS filesystem support**
161
+4. Verify your work by running `docker` without `sudo`.
185 162
 
186
-Ubuntu Raring already comes with the 3.8 kernel, so we don't need to
187
-install it. However, not all systems have AUFS filesystem support
188
-enabled. AUFS support is optional as of version 0.7, but it's still
189
-available as a driver and we recommend using it if you can.
163
+		$ docker run hello-world
190 164
 
191
-To make sure AUFS is installed, run the following commands:
192 165
 
193
-    $ sudo apt-get update
194
-    $ sudo apt-get install linux-image-extra-`uname -r`
166
+### Adjust memory and swap accounting
195 167
 
196
-### Installation
168
+When users run Docker, they may see these messages when working with an image:
197 169
 
198
-Docker is available as a Debian package, which makes installation easy.
170
+    WARNING: Your kernel does not support cgroup swap limit. WARNING: Your
171
+    kernel does not support swap limit capabilities. Limitation discarded.
199 172
 
200
-> **Warning**: 
201
-> Please note that these instructions have changed for 0.6. If you are
202
-> upgrading from an earlier version, you will need to follow them again.
173
+To prevent these messages, enable memory and swap accounting on your system. To
174
+enable these on system using GNU GRUB (GNU GRand Unified Bootloader), do the
175
+following.
203 176
 
204
-First add the Docker repository key to your local keychain.
177
+1. Log into Ubuntu as a user with `sudo` privileges.
205 178
 
206
-    $ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
179
+2. Edit the `/etc/default/grub` file.
207 180
 
208
-Add the Docker repository to your apt sources list, update and install
209
-the `lxc-docker` package.
181
+3. Set the `GRUB_CMDLINE_LINUX` value as follows:
210 182
 
211
-    $ sudo sh -c "echo deb http://get.docker.com/ubuntu docker main\
212
-    > /etc/apt/sources.list.d/docker.list"
213
-    $ sudo apt-get update
214
-    $ sudo apt-get install lxc-docker
183
+    	GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
215 184
 
216
-Now verify that the installation has worked by downloading the
217
-`ubuntu` image and launching a container.
185
+4. Save and close the file.
218 186
 
219
-    $ sudo docker run -i -t ubuntu /bin/bash
187
+5. Update GRUB.
220 188
 
221
-Type `exit` to exit
189
+		$ sudo update-grub
222 190
 
223
-**Done!**, now continue with the [User Guide](/userguide/).
191
+6. Reboot your system.
224 192
 
225
-### Upgrade
226 193
 
227
-To install the latest version of Docker, use the standard
228
-`apt-get` method:
194
+### Enable UFW forwarding
229 195
 
230
-    # update your sources list
231
-    $ sudo apt-get update
196
+If you use [UFW (Uncomplicated Firewall)](https://help.ubuntu.com/community/UFW)
197
+on the same host as you run Docker, you'll need to do additional configuration.
198
+Docker uses a bridge to manage container networking. By default, UFW drops all
199
+forwarding traffic. As a result, for Docker to run when UFW is
200
+enabled, you must set UFW's forwarding policy appropriately.
232 201
 
233
-    # install the latest
234
-    $ sudo apt-get install lxc-docker
202
+Also, UFW's default set of rules denies all incoming traffic. If you want to be able
203
+to reach your containers from another host then you should also allow incoming
204
+connections on the Docker port (default `2375`).
235 205
 
236
-## Giving non-root access
206
+To configure UFW and allow incoming connections on the Docker port:
237 207
 
238
-The `docker` daemon always runs as the `root` user, and since Docker
239
-version 0.5.2, the `docker` daemon binds to a Unix socket instead of a
240
-TCP port. By default that Unix socket is owned by the user `root`, and
241
-so, by default, you can access it with `sudo`.
208
+1. Log into Ubuntu as a user with `sudo` privileges.
242 209
 
243
-Starting in version 0.5.3, if you (or your Docker installer) create a
244
-Unix group called `docker` and add users to it, then the `docker` daemon
245
-will make the ownership of the Unix socket read/writable by the `docker`
246
-group when the daemon starts. The `docker` daemon must always run as the
247
-`root` user, but if you run the `docker` client as a user in the
248
-`docker` group then you don't need to add `sudo` to all the client
249
-commands.  From Docker 0.9.0 you can use the `-G` flag to specify an
250
-alternative group.
210
+2. Verify that UFW is installed and enabled.
251 211
 
252
-> **Warning**: 
253
-> The `docker` group (or the group specified with the `-G` flag) is
254
-> `root`-equivalent; see [*Docker Daemon Attack Surface*](
255
-> /articles/security/#docker-daemon-attack-surface) for details.
212
+		$ sudo ufw status
256 213
 
257
-**Example:**
214
+3. Open the `/etc/default/ufw` file for editing.
258 215
 
259
-    # Add the docker group if it doesn't already exist.
260
-    $ sudo groupadd docker
216
+		$ sudo nano /etc/default/ufw
261 217
 
262
-    # Add the connected user "${USER}" to the docker group.
263
-    # Change the user name to match your preferred user.
264
-    # You may have to logout and log back in again for
265
-    # this to take effect.
266
-    $ sudo gpasswd -a ${USER} docker
218
+4. Set the `DEFAULT_FORWARD_POLICY` policy to:
267 219
 
268
-    # Restart the Docker daemon.
269
-    # If you are in Ubuntu 14.04, use docker.io instead of docker
270
-    $ sudo service docker restart
220
+    	DEFAULT_FORWARD_POLICY="ACCEPT"
271 221
 
272
-## Memory and Swap Accounting
222
+5. Save and close the file.
273 223
 
274
-If you want to enable memory and swap accounting, you must add the
275
-following command-line parameters to your kernel:
224
+6. Reload UFW to use the new setting.
276 225
 
277
-    cgroup_enable=memory swapaccount=1
226
+		$ sudo ufw reload
278 227
 
279
-On systems using GRUB (which is the default for Ubuntu), you can add
280
-those parameters by editing `/etc/default/grub` and
281
-extending `GRUB_CMDLINE_LINUX`. Look for the
282
-following line:
228
+7. Allow incoming connections on the Docker port.
283 229
 
284
-    GRUB_CMDLINE_LINUX=""
230
+		$ sudo ufw allow 2375/tcp
285 231
 
286
-And replace it by the following one:
232
+### Configure a DNS server for use by Docker
287 233
 
288
-    GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
234
+Systems that run Ubuntu or an Ubuntu derivative on the desktop typically use
235
+`127.0.0.1` as the default `nameserver` in `/etc/resolv.conf` file. The
236
+NetworkManager also sets up `dnsmasq` to use the real DNS servers of the
237
+connection and sets up `nameserver 127.0.0.1` in /`etc/resolv.conf`.
289 238
 
290
-Then run `sudo update-grub`, and reboot.
239
+When starting containers on desktop machines with these configurations, Docker
240
+users see this warning:
291 241
 
292
-These parameters will help you get rid of the following warnings:
242
+    WARNING: Local (127.0.0.1) DNS resolver found in resolv.conf and containers
243
+    can't use it. Using default external servers : [8.8.8.8 8.8.4.4]
293 244
 
294
-    WARNING: Your kernel does not support cgroup swap limit.
295
-    WARNING: Your kernel does not support swap limit capabilities. Limitation discarded.
245
+The warning occurs because Docker containers can't use the local DNS nameserver.
246
+Instead, Docker defaults to using an external nameserver.
296 247
 
297
-## Troubleshooting
248
+To avoid this warning, you can specify a DNS server for use by Docker
249
+containers. Or, you can disable `dnsmasq` in NetworkManager. Though, disabiling
250
+`dnsmasq` might make DNS resolution slower on some networks.
298 251
 
299
-On Linux Mint, the `cgroup-lite` and `apparmor` packages are not
300
-installed by default. Before Docker will work correctly, you will need
301
-to install this via:
252
+To specify a DNS server for use by Docker:
302 253
 
303
-    $ sudo apt-get update && sudo apt-get install cgroup-lite apparmor
254
+1. Log into Ubuntu as a user with `sudo` privileges.
304 255
 
305
-## Docker and UFW
256
+2. Open the `/etc/default/docker` file for editing.
306 257
 
307
-Docker uses a bridge to manage container networking. By default, UFW
308
-drops all forwarding traffic. As a result you will need to enable UFW
309
-forwarding:
258
+     	$ sudo nano /etc/default/docker
310 259
 
311
-    $ sudo nano /etc/default/ufw
260
+3. Add a setting for Docker.
312 261
 
313
-    # Change:
314
-    # DEFAULT_FORWARD_POLICY="DROP"
315
-    # to
316
-    DEFAULT_FORWARD_POLICY="ACCEPT"
262
+      	DOCKER_OPTS="--dns 8.8.8.8"
317 263
 
318
-Then reload UFW:
264
+    Replace `8.8.8.8` with a local DNS server such as `192.168.1.1`. You can also
265
+    specify multiple DNS servers. Separated them with spaces, for example:
319 266
 
320
-    $ sudo ufw reload
267
+      	--dns 8.8.8.8 --dns 192.168.1.1
321 268
 
322
-UFW's default set of rules denies all incoming traffic. If you want to
323
-be able to reach your containers from another host then you should allow
324
-incoming connections on the Docker port (default 2375):
269
+	>**Warning**: If you're doing this on a laptop which connects to various
270
+	>networks, make sure to choose a public DNS server.
325 271
 
326
-    $ sudo ufw allow 2375/tcp
272
+4. Save and close the file.
327 273
 
328
-## Docker and local DNS server warnings
274
+5. Restart the Docker daemon.
329 275
 
330
-Systems which are running Ubuntu or an Ubuntu derivative on the desktop
331
-will use 127.0.0.1 as the default nameserver in /etc/resolv.conf.
332
-NetworkManager sets up dnsmasq to use the real DNS servers of the
333
-connection and sets up nameserver 127.0.0.1 in /etc/resolv.conf.
276
+    	$ sudo restart docker
334 277
 
335
-When starting containers on these desktop machines, users will see a
336
-warning:
337 278
 
338
-    WARNING: Local (127.0.0.1) DNS resolver found in resolv.conf and containers can't use it. Using default external servers : [8.8.8.8 8.8.4.4]
279
+&nbsp;
280
+&nbsp;
339 281
 
340
-This warning is shown because the containers can't use the local DNS
341
-nameserver and Docker will default to using an external nameserver.
282
+**Or, as an alternative to the previous procedure,** disable `dnsmasq` in
283
+NetworkManager (this might slow your network).
342 284
 
343
-This can be worked around by specifying a DNS server to be used by the
344
-Docker daemon for the containers:
285
+1. Open the `/etc/default/docker` file for editing.
345 286
 
346
-    $ sudo nano /etc/default/docker
347
-    ---
348
-    # Add:
349
-    DOCKER_OPTS="--dns 8.8.8.8"
350
-    # 8.8.8.8 could be replaced with a local DNS server, such as 192.168.1.1
351
-    # multiple DNS servers can be specified: --dns 8.8.8.8 --dns 192.168.1.1
287
+		$ sudo nano /etc/NetworkManager/NetworkManager.conf
352 288
 
353
-The Docker daemon has to be restarted:
289
+2. Comment out the `dns=dsnmasq` line:
354 290
 
355
-    $ sudo restart docker
291
+		dns=dnsmasq
356 292
 
357
-> **Warning**: 
358
-> If you're doing this on a laptop which connects to various networks,
359
-> make sure to choose a public DNS server.
293
+3. Save and close the file.
360 294
 
361
-An alternative solution involves disabling dnsmasq in NetworkManager by
362
-following these steps:
295
+4. Restart both the NetworkManager and Docker.
363 296
 
364
-    $ sudo nano /etc/NetworkManager/NetworkManager.conf
365
-    ----
366
-    # Change:
367
-    dns=dnsmasq
368
-    # to
369
-    #dns=dnsmasq
297
+		$ sudo restart network-manager $ sudo restart docker
370 298
 
371
-NetworkManager and Docker need to be restarted afterwards:
372 299
 
373
-    $ sudo restart network-manager
374
-    $ sudo restart docker
300
+## Upgrade Docker
375 301
 
376
-> **Warning**: This might make DNS resolution slower on some networks.
302
+To install the latest version of Docker, use the standard `-N` flag with `wget`:
377 303
 
378
-## Mirrors
304
+	$ wget -N https://get.docker.com/ | sh
379 305
 
380
-You should `ping get.docker.com` and compare the
381
-latency to the following mirrors, and pick whichever one is best for
382
-you.
383
-
384
-### Yandex
385
-
386
-[Yandex](http://yandex.ru/) in Russia is mirroring the Docker Debian
387
-packages, updating every 6 hours.
388
-Substitute `http://mirror.yandex.ru/mirrors/docker/` for
389
-`http://get.docker.com/ubuntu` in the instructions above.
390
-For example:
391
-
392
-    $ sudo sh -c "echo deb http://mirror.yandex.ru/mirrors/docker/ docker main\
393
-    > /etc/apt/sources.list.d/docker.list"
394
-    $ sudo apt-get update
395
-    $ sudo apt-get install lxc-docker