Signed-off-by: Megan Kostick <mkostick@us.ibm.com>
| ... | ... |
@@ -28,7 +28,7 @@ Docker is available in **SUSE Linux Enterprise 12 and later**. Please note that |
| 28 | 28 |
due to its current limitations Docker is able to run only on **64 bit** |
| 29 | 29 |
architecture. |
| 30 | 30 |
|
| 31 |
-# Installation |
|
| 31 |
+## Installation |
|
| 32 | 32 |
|
| 33 | 33 |
Install the Docker package. |
| 34 | 34 |
|
| ... | ... |
@@ -76,6 +76,20 @@ If you need to add an HTTP Proxy, set a different directory or partition for the |
| 76 | 76 |
Docker runtime files, or make other customizations, read our systemd article to |
| 77 | 77 |
learn how to [customize your systemd Docker daemon options](/articles/systemd/). |
| 78 | 78 |
|
| 79 |
+## Uninstallation |
|
| 80 |
+ |
|
| 81 |
+To uninstall the Docker package: |
|
| 82 |
+ |
|
| 83 |
+ $ sudo zypper rm docker |
|
| 84 |
+ |
|
| 85 |
+The above command will not remove images, containers, volumes, or user created |
|
| 86 |
+configuration files on your host. If you wish to delete all images, containers, |
|
| 87 |
+and volumes run the following command: |
|
| 88 |
+ |
|
| 89 |
+ $ rm -rf /var/lib/docker |
|
| 90 |
+ |
|
| 91 |
+You must delete the user created configuration files manually. |
|
| 92 |
+ |
|
| 79 | 93 |
## What's next |
| 80 | 94 |
|
| 81 | 95 |
Continue with the [User Guide](/userguide/). |
| ... | ... |
@@ -30,13 +30,13 @@ in the packages. The core dependencies are: |
| 30 | 30 |
|
| 31 | 31 |
For the normal package a simple |
| 32 | 32 |
|
| 33 |
- pacman -S docker |
|
| 33 |
+ $ sudo pacman -S docker |
|
| 34 | 34 |
|
| 35 | 35 |
is all that is needed. |
| 36 | 36 |
|
| 37 | 37 |
For the AUR package execute: |
| 38 | 38 |
|
| 39 |
- yaourt -S docker-git |
|
| 39 |
+ $ sudo yaourt -S docker-git |
|
| 40 | 40 |
|
| 41 | 41 |
The instructions here assume **yaourt** is installed. See [Arch User |
| 42 | 42 |
Repository](https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages) |
| ... | ... |
@@ -59,3 +59,21 @@ To start on system boot: |
| 59 | 59 |
If you need to add an HTTP Proxy, set a different directory or partition for the |
| 60 | 60 |
Docker runtime files, or make other customizations, read our systemd article to |
| 61 | 61 |
learn how to [customize your systemd Docker daemon options](/articles/systemd/). |
| 62 |
+ |
|
| 63 |
+## Uninstallation |
|
| 64 |
+ |
|
| 65 |
+To uninstall the Docker package: |
|
| 66 |
+ |
|
| 67 |
+ $ sudo pacman -R docker |
|
| 68 |
+ |
|
| 69 |
+To uninstall the Docker package and dependencies that are no longer needed: |
|
| 70 |
+ |
|
| 71 |
+ $ sudo pacman -Rns docker |
|
| 72 |
+ |
|
| 73 |
+The above commands will not remove images, containers, volumes, or user created |
|
| 74 |
+configuration files on your host. If you wish to delete all images, containers, |
|
| 75 |
+and volumes run the following command: |
|
| 76 |
+ |
|
| 77 |
+ $ rm -rf /var/lib/docker |
|
| 78 |
+ |
|
| 79 |
+You must delete the user created configuration files manually. |
| ... | ... |
@@ -25,7 +25,10 @@ To run Docker on [CentOS-6.5](http://www.centos.org) or later, you will need |
| 25 | 25 |
kernel version 2.6.32-431 or higher as this has specific kernel fixes to allow |
| 26 | 26 |
Docker to run. |
| 27 | 27 |
|
| 28 |
-## Installing Docker - CentOS-7 |
|
| 28 |
+## CentOS-7 |
|
| 29 |
+ |
|
| 30 |
+### Installation |
|
| 31 |
+ |
|
| 29 | 32 |
Docker is included by default in the CentOS-Extras repository. To install |
| 30 | 33 |
run the following command: |
| 31 | 34 |
|
| ... | ... |
@@ -33,7 +36,23 @@ run the following command: |
| 33 | 33 |
|
| 34 | 34 |
Please continue with the [Starting the Docker daemon](#starting-the-docker-daemon). |
| 35 | 35 |
|
| 36 |
-## Installing Docker - CentOS-6.5 |
|
| 36 |
+### Uninstallation |
|
| 37 |
+ |
|
| 38 |
+To uninstall the Docker package: |
|
| 39 |
+ |
|
| 40 |
+ $ sudo yum -y remove docker |
|
| 41 |
+ |
|
| 42 |
+The above command will not remove images, containers, volumes, or user created |
|
| 43 |
+configuration files on your host. If you wish to delete all images, containers, |
|
| 44 |
+and volumes run the following command: |
|
| 45 |
+ |
|
| 46 |
+ $ rm -rf /var/lib/docker |
|
| 47 |
+ |
|
| 48 |
+You must delete the user created configuration files manually. |
|
| 49 |
+ |
|
| 50 |
+## CentOS-6.5 |
|
| 51 |
+ |
|
| 52 |
+### Installation |
|
| 37 | 53 |
|
| 38 | 54 |
For CentOS-6.5, the Docker package is part of [Extra Packages |
| 39 | 55 |
for Enterprise Linux (EPEL)](https://fedoraproject.org/wiki/EPEL) repository, |
| ... | ... |
@@ -57,6 +76,20 @@ Next, let's install the `docker-io` package which will install Docker on our hos |
| 57 | 57 |
|
| 58 | 58 |
Please continue with the [Starting the Docker daemon](#starting-the-docker-daemon). |
| 59 | 59 |
|
| 60 |
+### Uninstallation |
|
| 61 |
+ |
|
| 62 |
+To uninstall the Docker package: |
|
| 63 |
+ |
|
| 64 |
+ $ sudo yum -y remove docker-io |
|
| 65 |
+ |
|
| 66 |
+The above command will not remove images, containers, volumes, or user created |
|
| 67 |
+configuration files on your host. If you wish to delete all images, containers, |
|
| 68 |
+and volumes run the following command: |
|
| 69 |
+ |
|
| 70 |
+ $ rm -rf /var/lib/docker |
|
| 71 |
+ |
|
| 72 |
+You must delete the user created configuration files manually. |
|
| 73 |
+ |
|
| 60 | 74 |
## Manual installation of latest Docker release |
| 61 | 75 |
|
| 62 | 76 |
While using a package is the recommended way of installing Docker, |
| ... | ... |
@@ -15,9 +15,9 @@ The `docker` port will build and install the latest tagged version of Docker. |
| 15 | 15 |
|
| 16 | 16 |
## Installation |
| 17 | 17 |
|
| 18 |
-Assuming you have contrib enabled, update your ports tree and install docker (*as root*): |
|
| 18 |
+Assuming you have contrib enabled, update your ports tree and install docker: |
|
| 19 | 19 |
|
| 20 |
- # prt-get depinst docker |
|
| 20 |
+ $ sudo prt-get depinst docker |
|
| 21 | 21 |
|
| 22 | 22 |
|
| 23 | 23 |
## Kernel requirements |
| ... | ... |
@@ -27,7 +27,7 @@ the necessary modules enabled for the Docker Daemon to function correctly. |
| 27 | 27 |
|
| 28 | 28 |
Please read the `README`: |
| 29 | 29 |
|
| 30 |
- $ prt-get readme docker |
|
| 30 |
+ $ sudo prt-get readme docker |
|
| 31 | 31 |
|
| 32 | 32 |
The `docker` port installs the `contrib/check-config.sh` script |
| 33 | 33 |
provided by the Docker contributors for checking your kernel |
| ... | ... |
@@ -39,9 +39,9 @@ To check your Kernel configuration run: |
| 39 | 39 |
|
| 40 | 40 |
## Starting Docker |
| 41 | 41 |
|
| 42 |
-There is a rc script created for Docker. To start the Docker service (*as root*): |
|
| 42 |
+There is a rc script created for Docker. To start the Docker service: |
|
| 43 | 43 |
|
| 44 |
- # /etc/rc.d/docker start |
|
| 44 |
+ $ sudo /etc/rc.d/docker start |
|
| 45 | 45 |
|
| 46 | 46 |
To start on system boot: |
| 47 | 47 |
|
| ... | ... |
@@ -60,6 +60,20 @@ or use it as part of your `FROM` line in your `Dockerfile(s)`. |
| 60 | 60 |
There are also user contributed [CRUX based image(s)](https://registry.hub.docker.com/repos/crux/) on the Docker Hub. |
| 61 | 61 |
|
| 62 | 62 |
|
| 63 |
+## Uninstallation |
|
| 64 |
+ |
|
| 65 |
+To uninstall the Docker package: |
|
| 66 |
+ |
|
| 67 |
+ $ sudo prt-get remove docker |
|
| 68 |
+ |
|
| 69 |
+The above command will not remove images, containers, volumes, or user created |
|
| 70 |
+configuration files on your host. If you wish to delete all images, containers, |
|
| 71 |
+and volumes run the following command: |
|
| 72 |
+ |
|
| 73 |
+ $ rm -rf /var/lib/docker |
|
| 74 |
+ |
|
| 75 |
+You must delete the user created configuration files manually. |
|
| 76 |
+ |
|
| 63 | 77 |
## Issues |
| 64 | 78 |
|
| 65 | 79 |
If you have any issues please file a bug with the |
| ... | ... |
@@ -37,6 +37,24 @@ container runs, it prints an informational message. Then, it exits. |
| 37 | 37 |
> If you want to enable memory and swap accounting see |
| 38 | 38 |
> [this](/installation/ubuntulinux/#memory-and-swap-accounting). |
| 39 | 39 |
|
| 40 |
+### Uninstallation |
|
| 41 |
+ |
|
| 42 |
+To uninstall the Docker package: |
|
| 43 |
+ |
|
| 44 |
+ $ sudo apt-get purge docker-io |
|
| 45 |
+ |
|
| 46 |
+To uninstall the Docker package and dependencies that are no longer needed: |
|
| 47 |
+ |
|
| 48 |
+ $ sudo apt-get autoremove --purge docker-io |
|
| 49 |
+ |
|
| 50 |
+The above commands will not remove images, containers, volumes, or user created |
|
| 51 |
+configuration files on your host. If you wish to delete all images, containers, |
|
| 52 |
+and volumes run the following command: |
|
| 53 |
+ |
|
| 54 |
+ $ rm -rf /var/lib/docker |
|
| 55 |
+ |
|
| 56 |
+You must delete the user created configuration files manually. |
|
| 57 |
+ |
|
| 40 | 58 |
## Debian Wheezy/Stable 7.x (64-bit) |
| 41 | 59 |
|
| 42 | 60 |
Docker requires Kernel 3.8+, while Wheezy ships with Kernel 3.2 (for more details |
| ... | ... |
@@ -74,6 +92,24 @@ which is officially supported by Docker. |
| 74 | 74 |
> |
| 75 | 75 |
> $ wget -qO- https://get.docker.com/gpg | sudo apt-key add - |
| 76 | 76 |
|
| 77 |
+### Uninstallation |
|
| 78 |
+ |
|
| 79 |
+To uninstall the Docker package: |
|
| 80 |
+ |
|
| 81 |
+ $ sudo apt-get purge lxc-docker |
|
| 82 |
+ |
|
| 83 |
+To uninstall the Docker package and dependencies that are no longer needed: |
|
| 84 |
+ |
|
| 85 |
+ $ sudo apt-get autoremove --purge lxc-docker |
|
| 86 |
+ |
|
| 87 |
+The above commands will not remove images, containers, volumes, or user created |
|
| 88 |
+configuration files on your host. If you wish to delete all images, containers, |
|
| 89 |
+and volumes run the following command: |
|
| 90 |
+ |
|
| 91 |
+ $ rm -rf /var/lib/docker |
|
| 92 |
+ |
|
| 93 |
+You must delete the user created configuration files manually. |
|
| 94 |
+ |
|
| 77 | 95 |
## Giving non-root access |
| 78 | 96 |
|
| 79 | 97 |
The `docker` daemon always runs as the `root` user and the `docker` |
| ... | ... |
@@ -13,19 +13,37 @@ Currently the Fedora project will only support Docker when running on kernels |
| 13 | 13 |
shipped by the distribution. There are kernel changes which will cause issues |
| 14 | 14 |
if one decides to step outside that box and run non-distribution kernel packages. |
| 15 | 15 |
|
| 16 |
-## Fedora 21 and later installation |
|
| 16 |
+## Fedora 21 and later |
|
| 17 | 17 |
|
| 18 |
-Install the `docker` package which will install Docker on our host. |
|
| 18 |
+### Installation |
|
| 19 |
+ |
|
| 20 |
+Install the Docker package which will install Docker on our host. |
|
| 19 | 21 |
|
| 20 | 22 |
$ sudo yum -y install docker |
| 21 | 23 |
|
| 22 |
-To update the `docker` package: |
|
| 24 |
+To update the Docker package: |
|
| 23 | 25 |
|
| 24 | 26 |
$ sudo yum -y update docker |
| 25 | 27 |
|
| 26 | 28 |
Please continue with the [Starting the Docker daemon](#starting-the-docker-daemon). |
| 27 | 29 |
|
| 28 |
-## Fedora 20 installation |
|
| 30 |
+### Uninstallation |
|
| 31 |
+ |
|
| 32 |
+To uninstall the Docker package: |
|
| 33 |
+ |
|
| 34 |
+ $ sudo yum -y remove docker |
|
| 35 |
+ |
|
| 36 |
+The above command will not remove images, containers, volumes, or user created |
|
| 37 |
+configuration files on your host. If you wish to delete all images, containers, |
|
| 38 |
+and volumes run the following command: |
|
| 39 |
+ |
|
| 40 |
+ $ rm -rf /var/lib/docker |
|
| 41 |
+ |
|
| 42 |
+You must delete the user created configuration files manually. |
|
| 43 |
+ |
|
| 44 |
+## Fedora 20 |
|
| 45 |
+ |
|
| 46 |
+### Installation |
|
| 29 | 47 |
|
| 30 | 48 |
For `Fedora 20`, there is a package name conflict with a system tray application |
| 31 | 49 |
and its executable, so the Docker RPM package was called `docker-io`. |
| ... | ... |
@@ -36,12 +54,26 @@ package first. |
| 36 | 36 |
$ sudo yum -y remove docker |
| 37 | 37 |
$ sudo yum -y install docker-io |
| 38 | 38 |
|
| 39 |
-To update the `docker` package: |
|
| 39 |
+To update the Docker package: |
|
| 40 | 40 |
|
| 41 | 41 |
$ sudo yum -y update docker-io |
| 42 | 42 |
|
| 43 | 43 |
Please continue with the [Starting the Docker daemon](#starting-the-docker-daemon). |
| 44 | 44 |
|
| 45 |
+### Uninstallation |
|
| 46 |
+ |
|
| 47 |
+To uninstall the Docker package: |
|
| 48 |
+ |
|
| 49 |
+ $ sudo yum -y remove docker-io |
|
| 50 |
+ |
|
| 51 |
+The above command will not remove images, containers, volumes, or user created |
|
| 52 |
+configuration files on your host. If you wish to delete all images, containers, |
|
| 53 |
+and volumes run the following command: |
|
| 54 |
+ |
|
| 55 |
+ $ rm -rf /var/lib/docker |
|
| 56 |
+ |
|
| 57 |
+You must delete the user created configuration files manually. |
|
| 58 |
+ |
|
| 45 | 59 |
## Starting the Docker daemon |
| 46 | 60 |
|
| 47 | 61 |
Now that it's installed, let's start the Docker daemon. |
| ... | ... |
@@ -28,7 +28,7 @@ in the packages. The core dependencies are: |
| 28 | 28 |
|
| 29 | 29 |
A simple |
| 30 | 30 |
|
| 31 |
- pacman -S lxc-docker |
|
| 31 |
+ $ sudo pacman -S lxc-docker |
|
| 32 | 32 |
|
| 33 | 33 |
is all that is needed. |
| 34 | 34 |
|
| ... | ... |
@@ -48,3 +48,21 @@ To start on system boot: |
| 48 | 48 |
If you need to add an HTTP Proxy, set a different directory or partition for the |
| 49 | 49 |
Docker runtime files, or make other customizations, read our systemd article to |
| 50 | 50 |
learn how to [customize your systemd Docker daemon options](/articles/systemd/). |
| 51 |
+ |
|
| 52 |
+## Uninstallation |
|
| 53 |
+ |
|
| 54 |
+To uninstall the Docker package: |
|
| 55 |
+ |
|
| 56 |
+ $ sudo pacman -R lxc-docker |
|
| 57 |
+ |
|
| 58 |
+To uninstall the Docker package and dependencies that are no longer needed: |
|
| 59 |
+ |
|
| 60 |
+ $ sudo pacman -Rns lxc-docker |
|
| 61 |
+ |
|
| 62 |
+The above commands will not remove images, containers, volumes, or user created |
|
| 63 |
+configuration files on your host. If you wish to delete all images, containers, |
|
| 64 |
+and volumes run the following command: |
|
| 65 |
+ |
|
| 66 |
+ $ rm -rf /var/lib/docker |
|
| 67 |
+ |
|
| 68 |
+You must delete the user created configuration files manually. |
| ... | ... |
@@ -95,3 +95,21 @@ To start on system boot: |
| 95 | 95 |
If you need to add an HTTP Proxy, set a different directory or partition for the |
| 96 | 96 |
Docker runtime files, or make other customizations, read our systemd article to |
| 97 | 97 |
learn how to [customize your systemd Docker daemon options](/articles/systemd/). |
| 98 |
+ |
|
| 99 |
+## Uninstallation |
|
| 100 |
+ |
|
| 101 |
+To uninstall the Docker package: |
|
| 102 |
+ |
|
| 103 |
+ $ sudo emerge -cav app-emulation/docker |
|
| 104 |
+ |
|
| 105 |
+To uninstall the Docker package and dependencies that are no longer needed: |
|
| 106 |
+ |
|
| 107 |
+ $ sudo emerge -C app-emulation/docker |
|
| 108 |
+ |
|
| 109 |
+The above commands will not remove images, containers, volumes, or user created |
|
| 110 |
+configuration files on your host. If you wish to delete all images, containers, |
|
| 111 |
+and volumes run the following command: |
|
| 112 |
+ |
|
| 113 |
+ $ rm -rf /var/lib/docker |
|
| 114 |
+ |
|
| 115 |
+You must delete the user created configuration files manually. |
| ... | ... |
@@ -2,7 +2,7 @@ page_title: Installation on Mac OS X |
| 2 | 2 |
page_description: Instructions for installing Docker on OS X using boot2docker. |
| 3 | 3 |
page_keywords: Docker, Docker documentation, requirements, boot2docker, VirtualBox, SSH, Linux, OSX, OS X, Mac |
| 4 | 4 |
|
| 5 |
-# Install Docker on Mac OS X |
|
| 5 |
+# Mac OS X |
|
| 6 | 6 |
|
| 7 | 7 |
You can install Docker using Boot2Docker to run `docker` commands at your command-line. |
| 8 | 8 |
Choose this installation if you are familiar with the command-line or plan to |
| ... | ... |
@@ -55,17 +55,17 @@ When you start the `boot2docker` process, the VM is assigned an IP address. Unde |
| 55 | 55 |
practice, work through the exercises on this page. |
| 56 | 56 |
|
| 57 | 57 |
|
| 58 |
-### Install Boot2Docker |
|
| 58 |
+### Installation |
|
| 59 | 59 |
|
| 60 | 60 |
1. Go to the [boot2docker/osx-installer ]( |
| 61 |
-https://github.com/boot2docker/osx-installer/releases/latest) release page. |
|
| 61 |
+ https://github.com/boot2docker/osx-installer/releases/latest) release page. |
|
| 62 | 62 |
|
| 63 | 63 |
4. Download Boot2Docker by clicking `Boot2Docker-x.x.x.pkg` in the "Downloads" |
| 64 |
-section. |
|
| 64 |
+ section. |
|
| 65 | 65 |
|
| 66 | 66 |
3. Install Boot2Docker by double-clicking the package. |
| 67 | 67 |
|
| 68 |
- The installer places Boot2Docker in your "Applications" folder. |
|
| 68 |
+ The installer places Boot2Docker in your "Applications" folder. |
|
| 69 | 69 |
|
| 70 | 70 |
The installation places the `docker` and `boot2docker` binaries in your |
| 71 | 71 |
`/usr/local/bin` directory. |
| ... | ... |
@@ -96,30 +96,32 @@ application: |
| 96 | 96 |
Once the launch completes, you can run `docker` commands. A good way to verify |
| 97 | 97 |
your setup succeeded is to run the `hello-world` container. |
| 98 | 98 |
|
| 99 |
- $ docker run hello-world |
|
| 100 |
- Unable to find image 'hello-world:latest' locally |
|
| 101 |
- 511136ea3c5a: Pull complete |
|
| 102 |
- 31cbccb51277: Pull complete |
|
| 103 |
- e45a5af57b00: Pull complete |
|
| 104 |
- hello-world:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security. |
|
| 105 |
- Status: Downloaded newer image for hello-world:latest |
|
| 106 |
- Hello from Docker. |
|
| 107 |
- This message shows that your installation appears to be working correctly. |
|
| 108 |
- |
|
| 109 |
- To generate this message, Docker took the following steps: |
|
| 110 |
- 1. The Docker client contacted the Docker daemon. |
|
| 111 |
- 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. |
|
| 112 |
- (Assuming it was not already locally available.) |
|
| 113 |
- 3. The Docker daemon created a new container from that image which runs the |
|
| 114 |
- executable that produces the output you are currently reading. |
|
| 115 |
- 4. The Docker daemon streamed that output to the Docker client, which sent it |
|
| 116 |
- to your terminal. |
|
| 117 |
- |
|
| 118 |
- To try something more ambitious, you can run an Ubuntu container with: |
|
| 119 |
- $ docker run -it ubuntu bash |
|
| 120 |
- |
|
| 121 |
- For more examples and ideas, visit: |
|
| 122 |
- http://docs.docker.com/userguide/ |
|
| 99 |
+ $ docker run hello-world |
|
| 100 |
+ Unable to find image 'hello-world:latest' locally |
|
| 101 |
+ 511136ea3c5a: Pull complete |
|
| 102 |
+ 31cbccb51277: Pull complete |
|
| 103 |
+ e45a5af57b00: Pull complete |
|
| 104 |
+ hello-world:latest: The image you are pulling has been verified. |
|
| 105 |
+ Important: image verification is a tech preview feature and should not be |
|
| 106 |
+ relied on to provide security. |
|
| 107 |
+ Status: Downloaded newer image for hello-world:latest |
|
| 108 |
+ Hello from Docker. |
|
| 109 |
+ This message shows that your installation appears to be working correctly. |
|
| 110 |
+ |
|
| 111 |
+ To generate this message, Docker took the following steps: |
|
| 112 |
+ 1. The Docker client contacted the Docker daemon. |
|
| 113 |
+ 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. |
|
| 114 |
+ (Assuming it was not already locally available.) |
|
| 115 |
+ 3. The Docker daemon created a new container from that image which runs the |
|
| 116 |
+ executable that produces the output you are currently reading. |
|
| 117 |
+ 4. The Docker daemon streamed that output to the Docker client, which sent it |
|
| 118 |
+ to your terminal. |
|
| 119 |
+ |
|
| 120 |
+ To try something more ambitious, you can run an Ubuntu container with: |
|
| 121 |
+ $ docker run -it ubuntu bash |
|
| 122 |
+ |
|
| 123 |
+ For more examples and ideas, visit: |
|
| 124 |
+ http://docs.docker.com/userguide/ |
|
| 123 | 125 |
|
| 124 | 126 |
|
| 125 | 127 |
A more typical way to start and stop `boot2docker` is using the command line. |
| ... | ... |
@@ -130,36 +132,36 @@ Initialize and run `boot2docker` from the command line, do the following: |
| 130 | 130 |
|
| 131 | 131 |
1. Create a new Boot2Docker VM. |
| 132 | 132 |
|
| 133 |
- $ boot2docker init |
|
| 133 |
+ $ boot2docker init |
|
| 134 | 134 |
|
| 135 |
- This creates a new virtual machine. You only need to run this command once. |
|
| 135 |
+ This creates a new virtual machine. You only need to run this command once. |
|
| 136 | 136 |
|
| 137 | 137 |
2. Start the `boot2docker` VM. |
| 138 | 138 |
|
| 139 |
- $ boot2docker start |
|
| 139 |
+ $ boot2docker start |
|
| 140 | 140 |
|
| 141 | 141 |
3. Display the environment variables for the Docker client. |
| 142 | 142 |
|
| 143 |
- $ boot2docker shellinit |
|
| 144 |
- Writing /Users/mary/.boot2docker/certs/boot2docker-vm/ca.pem |
|
| 145 |
- Writing /Users/mary/.boot2docker/certs/boot2docker-vm/cert.pem |
|
| 146 |
- Writing /Users/mary/.boot2docker/certs/boot2docker-vm/key.pem |
|
| 147 |
- export DOCKER_HOST=tcp://192.168.59.103:2376 |
|
| 148 |
- export DOCKER_CERT_PATH=/Users/mary/.boot2docker/certs/boot2docker-vm |
|
| 149 |
- export DOCKER_TLS_VERIFY=1 |
|
| 143 |
+ $ boot2docker shellinit |
|
| 144 |
+ Writing /Users/mary/.boot2docker/certs/boot2docker-vm/ca.pem |
|
| 145 |
+ Writing /Users/mary/.boot2docker/certs/boot2docker-vm/cert.pem |
|
| 146 |
+ Writing /Users/mary/.boot2docker/certs/boot2docker-vm/key.pem |
|
| 147 |
+ export DOCKER_HOST=tcp://192.168.59.103:2376 |
|
| 148 |
+ export DOCKER_CERT_PATH=/Users/mary/.boot2docker/certs/boot2docker-vm |
|
| 149 |
+ export DOCKER_TLS_VERIFY=1 |
|
| 150 | 150 |
|
| 151 |
- The specific paths and address on your machine will be different. |
|
| 151 |
+ The specific paths and address on your machine will be different. |
|
| 152 | 152 |
|
| 153 | 153 |
4. To set the environment variables in your shell do the following: |
| 154 | 154 |
|
| 155 |
- $ eval "$(boot2docker shellinit)" |
|
| 155 |
+ $ eval "$(boot2docker shellinit)" |
|
| 156 | 156 |
|
| 157 |
- You can also set them manually by using the `export` commands `boot2docker` |
|
| 158 |
- returns. |
|
| 157 |
+ You can also set them manually by using the `export` commands `boot2docker` |
|
| 158 |
+ returns. |
|
| 159 | 159 |
|
| 160 | 160 |
5. Run the `hello-world` container to verify your setup. |
| 161 | 161 |
|
| 162 |
- $ docker run hello-world |
|
| 162 |
+ $ docker run hello-world |
|
| 163 | 163 |
|
| 164 | 164 |
|
| 165 | 165 |
## Basic Boot2Docker exercises |
| ... | ... |
@@ -167,8 +169,8 @@ Initialize and run `boot2docker` from the command line, do the following: |
| 167 | 167 |
At this point, you should have `boot2docker` running and the `docker` client |
| 168 | 168 |
environment initialized. To verify this, run the following commands: |
| 169 | 169 |
|
| 170 |
- $ boot2docker status |
|
| 171 |
- $ docker version |
|
| 170 |
+ $ boot2docker status |
|
| 171 |
+ $ docker version |
|
| 172 | 172 |
|
| 173 | 173 |
Work through this section to try some practical container tasks using `boot2docker` VM. |
| 174 | 174 |
|
| ... | ... |
@@ -176,52 +178,52 @@ Work through this section to try some practical container tasks using `boot2dock |
| 176 | 176 |
|
| 177 | 177 |
1. Start an NGINX container on the DOCKER_HOST. |
| 178 | 178 |
|
| 179 |
- $ docker run -d -P --name web nginx |
|
| 179 |
+ $ docker run -d -P --name web nginx |
|
| 180 | 180 |
|
| 181 |
- Normally, the `docker run` commands starts a container, runs it, and then |
|
| 182 |
- exits. The `-d` flag keeps the container running in the background |
|
| 183 |
- after the `docker run` command completes. The `-P` flag publishes exposed ports from the |
|
| 184 |
- container to your local host; this lets you access them from your Mac. |
|
| 181 |
+ Normally, the `docker run` commands starts a container, runs it, and then |
|
| 182 |
+ exits. The `-d` flag keeps the container running in the background |
|
| 183 |
+ after the `docker run` command completes. The `-P` flag publishes exposed ports from the |
|
| 184 |
+ container to your local host; this lets you access them from your Mac. |
|
| 185 | 185 |
|
| 186 | 186 |
2. Display your running container with `docker ps` command |
| 187 | 187 |
|
| 188 |
- CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
|
| 189 |
- 5fb65ff765e9 nginx:latest "nginx -g 'daemon of 3 minutes ago Up 3 minutes 0.0.0.0:49156->443/tcp, 0.0.0.0:49157->80/tcp web |
|
| 188 |
+ CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
|
| 189 |
+ 5fb65ff765e9 nginx:latest "nginx -g 'daemon of 3 minutes ago Up 3 minutes 0.0.0.0:49156->443/tcp, 0.0.0.0:49157->80/tcp web |
|
| 190 | 190 |
|
| 191 |
- At this point, you can see `nginx` is running as a daemon. |
|
| 191 |
+ At this point, you can see `nginx` is running as a daemon. |
|
| 192 | 192 |
|
| 193 | 193 |
3. View just the container's ports. |
| 194 | 194 |
|
| 195 |
- $ docker port web |
|
| 196 |
- 443/tcp -> 0.0.0.0:49156 |
|
| 197 |
- 80/tcp -> 0.0.0.0:49157 |
|
| 195 |
+ $ docker port web |
|
| 196 |
+ 443/tcp -> 0.0.0.0:49156 |
|
| 197 |
+ 80/tcp -> 0.0.0.0:49157 |
|
| 198 | 198 |
|
| 199 |
- This tells you that the `web` container's port `80` is mapped to port |
|
| 200 |
- `49157` on your Docker host. |
|
| 199 |
+ This tells you that the `web` container's port `80` is mapped to port |
|
| 200 |
+ `49157` on your Docker host. |
|
| 201 | 201 |
|
| 202 | 202 |
4. Enter the `http://localhost:49157` address (`localhost` is `0.0.0.0`) in your browser: |
| 203 | 203 |
|
| 204 |
-  |
|
| 204 |
+  |
|
| 205 | 205 |
|
| 206 |
- This didn't work. The reason it doesn't work is your `DOCKER_HOST` address is |
|
| 207 |
- not the localhost address (0.0.0.0) but is instead the address of the |
|
| 208 |
- `boot2docker` VM. |
|
| 206 |
+ This didn't work. The reason it doesn't work is your `DOCKER_HOST` address is |
|
| 207 |
+ not the localhost address (0.0.0.0) but is instead the address of the |
|
| 208 |
+ `boot2docker` VM. |
|
| 209 | 209 |
|
| 210 | 210 |
5. Get the address of the `boot2docker` VM. |
| 211 | 211 |
|
| 212 |
- $ boot2docker ip |
|
| 213 |
- 192.168.59.103 |
|
| 212 |
+ $ boot2docker ip |
|
| 213 |
+ 192.168.59.103 |
|
| 214 | 214 |
|
| 215 | 215 |
6. Enter the `http://192.168.59.103:49157` address in your browser: |
| 216 | 216 |
|
| 217 |
-  |
|
| 217 |
+  |
|
| 218 | 218 |
|
| 219 |
- Success! |
|
| 219 |
+ Success! |
|
| 220 | 220 |
|
| 221 | 221 |
7. To stop and then remove your running `nginx` container, do the following: |
| 222 | 222 |
|
| 223 |
- $ docker stop web |
|
| 224 |
- $ docker rm web |
|
| 223 |
+ $ docker stop web |
|
| 224 |
+ $ docker rm web |
|
| 225 | 225 |
|
| 226 | 226 |
### Mount a volume on the container |
| 227 | 227 |
|
| ... | ... |
@@ -231,46 +233,46 @@ The next exercise demonstrates how to do this. |
| 231 | 231 |
|
| 232 | 232 |
1. Change to your user `$HOME` directory. |
| 233 | 233 |
|
| 234 |
- $ cd $HOME |
|
| 234 |
+ $ cd $HOME |
|
| 235 | 235 |
|
| 236 | 236 |
2. Make a new `site` directory. |
| 237 | 237 |
|
| 238 |
- $ mkdir site |
|
| 238 |
+ $ mkdir site |
|
| 239 | 239 |
|
| 240 | 240 |
3. Change into the `site` directory. |
| 241 | 241 |
|
| 242 |
- $ cd site |
|
| 242 |
+ $ cd site |
|
| 243 | 243 |
|
| 244 | 244 |
4. Create a new `index.html` file. |
| 245 | 245 |
|
| 246 |
- $ echo "my new site" > index.html |
|
| 246 |
+ $ echo "my new site" > index.html |
|
| 247 | 247 |
|
| 248 | 248 |
5. Start a new `nginx` container and replace the `html` folder with your `site` directory. |
| 249 | 249 |
|
| 250 |
- $ docker run -d -P -v $HOME/site:/usr/share/nginx/html --name mysite nginx |
|
| 250 |
+ $ docker run -d -P -v $HOME/site:/usr/share/nginx/html --name mysite nginx |
|
| 251 | 251 |
|
| 252 | 252 |
6. Get the `mysite` container's port. |
| 253 | 253 |
|
| 254 |
- $ docker port mysite |
|
| 255 |
- 80/tcp -> 0.0.0.0:49166 |
|
| 256 |
- 443/tcp -> 0.0.0.0:49165 |
|
| 254 |
+ $ docker port mysite |
|
| 255 |
+ 80/tcp -> 0.0.0.0:49166 |
|
| 256 |
+ 443/tcp -> 0.0.0.0:49165 |
|
| 257 | 257 |
|
| 258 | 258 |
7. Open the site in a browser: |
| 259 | 259 |
|
| 260 |
-  |
|
| 260 |
+  |
|
| 261 | 261 |
|
| 262 | 262 |
8. Try adding a page to your `$HOME/site` in real time. |
| 263 | 263 |
|
| 264 |
- $ echo "This is cool" > cool.html |
|
| 264 |
+ $ echo "This is cool" > cool.html |
|
| 265 | 265 |
|
| 266 | 266 |
9. Open the new page in the browser. |
| 267 | 267 |
|
| 268 |
-  |
|
| 268 |
+  |
|
| 269 | 269 |
|
| 270 | 270 |
9. Stop and then remove your running `mysite` container. |
| 271 | 271 |
|
| 272 |
- $ docker stop mysite |
|
| 273 |
- $ docker rm mysite |
|
| 272 |
+ $ docker stop mysite |
|
| 273 |
+ $ docker rm mysite |
|
| 274 | 274 |
|
| 275 | 275 |
## Upgrade Boot2Docker |
| 276 | 276 |
|
| ... | ... |
@@ -286,11 +288,11 @@ To upgrade from 1.4.1 or greater, you can do this: |
| 286 | 286 |
|
| 287 | 287 |
2. Stop the `boot2docker` application. |
| 288 | 288 |
|
| 289 |
- $ boot2docker stop |
|
| 289 |
+ $ boot2docker stop |
|
| 290 | 290 |
|
| 291 | 291 |
3. Run the upgrade command. |
| 292 | 292 |
|
| 293 |
- $ boot2docker upgrade |
|
| 293 |
+ $ boot2docker upgrade |
|
| 294 | 294 |
|
| 295 | 295 |
|
| 296 | 296 |
### Use the installer |
| ... | ... |
@@ -301,21 +303,45 @@ To upgrade any version of Boot2Docker, do this: |
| 301 | 301 |
|
| 302 | 302 |
2. Stop the `boot2docker` application. |
| 303 | 303 |
|
| 304 |
- $ boot2docker stop |
|
| 304 |
+ $ boot2docker stop |
|
| 305 | 305 |
|
| 306 | 306 |
3. Go to the [boot2docker/osx-installer ]( |
| 307 | 307 |
https://github.com/boot2docker/osx-installer/releases/latest) release page. |
| 308 | 308 |
|
| 309 | 309 |
4. Download Boot2Docker by clicking `Boot2Docker-x.x.x.pkg` in the "Downloads" |
| 310 |
-section. |
|
| 310 |
+ section. |
|
| 311 | 311 |
|
| 312 | 312 |
2. Install Boot2Docker by double-clicking the package. |
| 313 | 313 |
|
| 314 |
- The installer places Boot2Docker in your "Applications" folder. |
|
| 314 |
+ The installer places Boot2Docker in your "Applications" folder. |
|
| 315 | 315 |
|
| 316 | 316 |
|
| 317 |
-## Learning more and acknowledgement |
|
| 317 |
+## Uninstallation |
|
| 318 |
+ |
|
| 319 |
+1. Go to the [boot2docker/osx-installer ]( |
|
| 320 |
+ https://github.com/boot2docker/osx-installer/releases/latest) release page. |
|
| 321 |
+ |
|
| 322 |
+2. Download the source code by clicking `Source code (zip)` or |
|
| 323 |
+ `Source code (tar.gz)` in the "Downloads" section. |
|
| 324 |
+ |
|
| 325 |
+3. Extract the source code. |
|
| 318 | 326 |
|
| 327 |
+4. Open a terminal on your local machine. |
|
| 328 |
+ |
|
| 329 |
+5. Change to the directory where you extracted the source code: |
|
| 330 |
+ |
|
| 331 |
+ $ cd <path to extracted source code> |
|
| 332 |
+ |
|
| 333 |
+6. Make sure the uninstall.sh script is executable: |
|
| 334 |
+ |
|
| 335 |
+ $ chmod +x uninstall.sh |
|
| 336 |
+ |
|
| 337 |
+7. Run the uninstall.sh script: |
|
| 338 |
+ |
|
| 339 |
+ $ ./uninstall.sh |
|
| 340 |
+ |
|
| 341 |
+ |
|
| 342 |
+## Learning more and acknowledgement |
|
| 319 | 343 |
|
| 320 | 344 |
Use `boot2docker help` to list the full command line reference. For more |
| 321 | 345 |
information about using SSH or SCP to access the Boot2Docker VM, see the README |
| ... | ... |
@@ -43,35 +43,35 @@ To enable the *addons* repository: |
| 43 | 43 |
`/etc/yum.repos.d/public-yum-ol7.repo` |
| 44 | 44 |
and set `enabled=1` in the `[ol6_addons]` or the `[ol7_addons]` stanza. |
| 45 | 45 |
|
| 46 |
-## To install Docker: |
|
| 46 |
+## Installation |
|
| 47 | 47 |
|
| 48 | 48 |
1. Ensure the appropriate *addons* channel or repository has been enabled. |
| 49 | 49 |
|
| 50 | 50 |
2. Use yum to install the Docker package: |
| 51 | 51 |
|
| 52 |
- $ sudo yum install docker |
|
| 52 |
+ $ sudo yum install docker |
|
| 53 | 53 |
|
| 54 |
-## To start Docker: |
|
| 54 |
+## Starting Docker |
|
| 55 | 55 |
|
| 56 | 56 |
1. Now that it's installed, start the Docker daemon: |
| 57 | 57 |
|
| 58 |
- 1. On Oracle Linux 6: |
|
| 58 |
+ 1. On Oracle Linux 6: |
|
| 59 | 59 |
|
| 60 |
- $ sudo service docker start |
|
| 60 |
+ $ sudo service docker start |
|
| 61 | 61 |
|
| 62 |
- 2. On Oracle Linux 7: |
|
| 62 |
+ 2. On Oracle Linux 7: |
|
| 63 | 63 |
|
| 64 |
- $ sudo systemctl start docker.service |
|
| 64 |
+ $ sudo systemctl start docker.service |
|
| 65 | 65 |
|
| 66 | 66 |
2. If you want the Docker daemon to start automatically at boot: |
| 67 | 67 |
|
| 68 |
- 1. On Oracle Linux 6: |
|
| 68 |
+ 1. On Oracle Linux 6: |
|
| 69 | 69 |
|
| 70 |
- $ sudo chkconfig docker on |
|
| 70 |
+ $ sudo chkconfig docker on |
|
| 71 | 71 |
|
| 72 |
- 2. On Oracle Linux 7: |
|
| 72 |
+ 2. On Oracle Linux 7: |
|
| 73 | 73 |
|
| 74 |
- $ sudo systemctl enable docker.service |
|
| 74 |
+ $ sudo systemctl enable docker.service |
|
| 75 | 75 |
|
| 76 | 76 |
**Done!** |
| 77 | 77 |
|
| ... | ... |
@@ -99,6 +99,20 @@ To enable btrfs support on Oracle Linux: |
| 99 | 99 |
|
| 100 | 100 |
You can now continue with the [Docker User Guide](/userguide/). |
| 101 | 101 |
|
| 102 |
+## Uninstallation |
|
| 103 |
+ |
|
| 104 |
+To uninstall the Docker package: |
|
| 105 |
+ |
|
| 106 |
+ $ sudo yum -y remove docker |
|
| 107 |
+ |
|
| 108 |
+The above command will not remove images, containers, volumes, or user created |
|
| 109 |
+configuration files on your host. If you wish to delete all images, containers, |
|
| 110 |
+and volumes run the following command: |
|
| 111 |
+ |
|
| 112 |
+ $ rm -rf /var/lib/docker |
|
| 113 |
+ |
|
| 114 |
+You must delete the user created configuration files manually. |
|
| 115 |
+ |
|
| 102 | 116 |
## Known issues |
| 103 | 117 |
|
| 104 | 118 |
### Docker unmounts btrfs filesystem on shutdown |
| ... | ... |
@@ -16,7 +16,9 @@ running on kernels shipped by the distribution. There are kernel changes which |
| 16 | 16 |
will cause issues if one decides to step outside that box and run |
| 17 | 17 |
non-distribution kernel packages. |
| 18 | 18 |
|
| 19 |
-## Red Hat Enterprise Linux 7 installation |
|
| 19 |
+## Red Hat Enterprise Linux 7 |
|
| 20 |
+ |
|
| 21 |
+### Installation |
|
| 20 | 22 |
|
| 21 | 23 |
**Red Hat Enterprise Linux 7 (64 bit)** has [shipped with |
| 22 | 24 |
Docker](https://access.redhat.com/site/products/red-hat-enterprise-linux/docker-and-containers). |
| ... | ... |
@@ -41,7 +43,21 @@ Portal](https://access.redhat.com/). |
| 41 | 41 |
|
| 42 | 42 |
Please continue with the [Starting the Docker daemon](#starting-the-docker-daemon). |
| 43 | 43 |
|
| 44 |
-## Red Hat Enterprise Linux 6.6 installation |
|
| 44 |
+### Uninstallation |
|
| 45 |
+ |
|
| 46 |
+To uninstall the Docker package: |
|
| 47 |
+ |
|
| 48 |
+ $ sudo yum -y remove docker |
|
| 49 |
+ |
|
| 50 |
+The above command will not remove images, containers, volumes, or user created |
|
| 51 |
+configuration files on your host. If you wish to delete all images, containers, |
|
| 52 |
+and volumes run the following command: |
|
| 53 |
+ |
|
| 54 |
+ $ rm -rf /var/lib/docker |
|
| 55 |
+ |
|
| 56 |
+You must delete the user created configuration files manually. |
|
| 57 |
+ |
|
| 58 |
+## Red Hat Enterprise Linux 6.6 |
|
| 45 | 59 |
|
| 46 | 60 |
You will need **64 bit** [RHEL |
| 47 | 61 |
6.6](https://access.redhat.com/site/articles/3078#RHEL6) or later, with |
| ... | ... |
@@ -66,7 +82,7 @@ non-distro kernel packages. |
| 66 | 66 |
> vulnerabilities and severe bugs (such as those found in kernel 2.6.32) |
| 67 | 67 |
> are fixed. |
| 68 | 68 |
|
| 69 |
-## Installation |
|
| 69 |
+### Installation |
|
| 70 | 70 |
|
| 71 | 71 |
Firstly, you need to install the EPEL repository. Please follow the |
| 72 | 72 |
[EPEL installation |
| ... | ... |
@@ -90,6 +106,20 @@ To update the `docker-io` package |
| 90 | 90 |
|
| 91 | 91 |
Please continue with the [Starting the Docker daemon](#starting-the-docker-daemon). |
| 92 | 92 |
|
| 93 |
+### Uninstallation |
|
| 94 |
+ |
|
| 95 |
+To uninstall the Docker package: |
|
| 96 |
+ |
|
| 97 |
+ $ sudo yum -y remove docker-io |
|
| 98 |
+ |
|
| 99 |
+The above command will not remove images, containers, volumes, or user created |
|
| 100 |
+configuration files on your host. If you wish to delete all images, containers, |
|
| 101 |
+and volumes run the following command: |
|
| 102 |
+ |
|
| 103 |
+ $ rm -rf /var/lib/docker |
|
| 104 |
+ |
|
| 105 |
+You must delete the user created configuration files manually. |
|
| 106 |
+ |
|
| 93 | 107 |
## Starting the Docker daemon |
| 94 | 108 |
|
| 95 | 109 |
Now that it's installed, let's start the Docker daemon. |
| ... | ... |
@@ -118,7 +148,6 @@ If you need to add an HTTP Proxy, set a different directory or partition for the |
| 118 | 118 |
Docker runtime files, or make other customizations, read our Systemd article to |
| 119 | 119 |
learn how to [customize your Systemd Docker daemon options](/articles/systemd/). |
| 120 | 120 |
|
| 121 |
- |
|
| 122 | 121 |
## Issues? |
| 123 | 122 |
|
| 124 | 123 |
If you have any issues - please report them directly in the |
| ... | ... |
@@ -28,8 +28,8 @@ and frequently panic under certain conditions. |
| 28 | 28 |
To check your current kernel version, open a terminal and use `uname -r` to display |
| 29 | 29 |
your kernel version: |
| 30 | 30 |
|
| 31 |
- $ uname -r |
|
| 32 |
- 3.11.0-15-generic |
|
| 31 |
+ $ uname -r |
|
| 32 |
+ 3.11.0-15-generic |
|
| 33 | 33 |
|
| 34 | 34 |
>**Caution** Some Ubuntu OS versions **require a version higher than 3.10** to |
| 35 | 35 |
>run Docker, see the prerequisites on this page that apply to your Ubuntu |
| ... | ... |
@@ -72,17 +72,17 @@ To upgrade your kernel and install the additional packages, do the following: |
| 72 | 72 |
|
| 73 | 73 |
2. Update your package manager. |
| 74 | 74 |
|
| 75 |
- $ sudo apt-get update |
|
| 75 |
+ $ sudo apt-get update |
|
| 76 | 76 |
|
| 77 | 77 |
3. Install both the required and optional packages. |
| 78 | 78 |
|
| 79 |
- $ sudo apt-get install linux-image-generic-lts-trusty |
|
| 79 |
+ $ sudo apt-get install linux-image-generic-lts-trusty |
|
| 80 | 80 |
|
| 81 |
- Depending on your environment, you may install more as described in the preceding table. |
|
| 81 |
+ Depending on your environment, you may install more as described in the preceding table. |
|
| 82 | 82 |
|
| 83 | 83 |
4. Reboot your host. |
| 84 | 84 |
|
| 85 |
- $ sudo reboot |
|
| 85 |
+ $ sudo reboot |
|
| 86 | 86 |
|
| 87 | 87 |
5. After your system reboots, go ahead and [install Docker](#installing-docker-on-ubuntu). |
| 88 | 88 |
|
| ... | ... |
@@ -92,7 +92,7 @@ To upgrade your kernel and install the additional packages, do the following: |
| 92 | 92 |
Docker uses AUFS as the default storage backend. If you don't have this |
| 93 | 93 |
prerequisite installed, Docker's installation process adds it. |
| 94 | 94 |
|
| 95 |
-##Installing Docker on Ubuntu |
|
| 95 |
+##Installation |
|
| 96 | 96 |
|
| 97 | 97 |
Make sure you have installed the prerequisites for your Ubuntu version. Then, |
| 98 | 98 |
install Docker using the following: |
| ... | ... |
@@ -101,19 +101,19 @@ install Docker using the following: |
| 101 | 101 |
|
| 102 | 102 |
2. Verify that you have `wget` installed. |
| 103 | 103 |
|
| 104 |
- $ which wget |
|
| 104 |
+ $ which wget |
|
| 105 | 105 |
|
| 106 |
- If `wget` isn't installed, install it after updating your manager: |
|
| 106 |
+ If `wget` isn't installed, install it after updating your manager: |
|
| 107 | 107 |
|
| 108 |
- $ sudo apt-get update |
|
| 109 |
- $ sudo apt-get install wget |
|
| 108 |
+ $ sudo apt-get update |
|
| 109 |
+ $ sudo apt-get install wget |
|
| 110 | 110 |
|
| 111 | 111 |
3. Get the latest Docker package. |
| 112 | 112 |
|
| 113 |
- $ wget -qO- https://get.docker.com/ | sh |
|
| 113 |
+ $ wget -qO- https://get.docker.com/ | sh |
|
| 114 | 114 |
|
| 115 |
- The system prompts you for your `sudo` password. Then, it downloads and |
|
| 116 |
- installs Docker and its dependencies. |
|
| 115 |
+ The system prompts you for your `sudo` password. Then, it downloads and |
|
| 116 |
+ installs Docker and its dependencies. |
|
| 117 | 117 |
>**Note**: If your company is behind a filtering proxy, you may find that the |
| 118 | 118 |
>`apt-key` |
| 119 | 119 |
>command fails for the Docker repo during installation. To work around this, |
| ... | ... |
@@ -123,9 +123,9 @@ install Docker using the following: |
| 123 | 123 |
|
| 124 | 124 |
4. Verify `docker` is installed correctly. |
| 125 | 125 |
|
| 126 |
- $ sudo docker run hello-world |
|
| 126 |
+ $ sudo docker run hello-world |
|
| 127 | 127 |
|
| 128 |
- This command downloads a test image and runs it in a container. |
|
| 128 |
+ This command downloads a test image and runs it in a container. |
|
| 129 | 129 |
|
| 130 | 130 |
## Optional configurations for Docker on Ubuntu |
| 131 | 131 |
|
| ... | ... |
@@ -155,19 +155,19 @@ To create the `docker` group and add your user: |
| 155 | 155 |
|
| 156 | 156 |
1. Log into Ubuntu as a user with `sudo` privileges. |
| 157 | 157 |
|
| 158 |
- This procedure assumes you log in as the `ubuntu` user. |
|
| 158 |
+ This procedure assumes you log in as the `ubuntu` user. |
|
| 159 | 159 |
|
| 160 | 160 |
3. Create the `docker` group and add your user. |
| 161 | 161 |
|
| 162 |
- $ sudo usermod -aG docker ubuntu |
|
| 162 |
+ $ sudo usermod -aG docker ubuntu |
|
| 163 | 163 |
|
| 164 | 164 |
3. Log out and log back in. |
| 165 | 165 |
|
| 166 |
- This ensures your user is running with the correct permissions. |
|
| 166 |
+ This ensures your user is running with the correct permissions. |
|
| 167 | 167 |
|
| 168 | 168 |
4. Verify your work by running `docker` without `sudo`. |
| 169 | 169 |
|
| 170 |
- $ docker run hello-world |
|
| 170 |
+ $ docker run hello-world |
|
| 171 | 171 |
|
| 172 | 172 |
|
| 173 | 173 |
### Adjust memory and swap accounting |
| ... | ... |
@@ -187,13 +187,13 @@ following. |
| 187 | 187 |
|
| 188 | 188 |
3. Set the `GRUB_CMDLINE_LINUX` value as follows: |
| 189 | 189 |
|
| 190 |
- GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1" |
|
| 190 |
+ GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1" |
|
| 191 | 191 |
|
| 192 | 192 |
4. Save and close the file. |
| 193 | 193 |
|
| 194 | 194 |
5. Update GRUB. |
| 195 | 195 |
|
| 196 |
- $ sudo update-grub |
|
| 196 |
+ $ sudo update-grub |
|
| 197 | 197 |
|
| 198 | 198 |
6. Reboot your system. |
| 199 | 199 |
|
| ... | ... |
@@ -216,25 +216,25 @@ To configure UFW and allow incoming connections on the Docker port: |
| 216 | 216 |
|
| 217 | 217 |
2. Verify that UFW is installed and enabled. |
| 218 | 218 |
|
| 219 |
- $ sudo ufw status |
|
| 219 |
+ $ sudo ufw status |
|
| 220 | 220 |
|
| 221 | 221 |
3. Open the `/etc/default/ufw` file for editing. |
| 222 | 222 |
|
| 223 |
- $ sudo nano /etc/default/ufw |
|
| 223 |
+ $ sudo nano /etc/default/ufw |
|
| 224 | 224 |
|
| 225 | 225 |
4. Set the `DEFAULT_FORWARD_POLICY` policy to: |
| 226 | 226 |
|
| 227 |
- DEFAULT_FORWARD_POLICY="ACCEPT" |
|
| 227 |
+ DEFAULT_FORWARD_POLICY="ACCEPT" |
|
| 228 | 228 |
|
| 229 | 229 |
5. Save and close the file. |
| 230 | 230 |
|
| 231 | 231 |
6. Reload UFW to use the new setting. |
| 232 | 232 |
|
| 233 |
- $ sudo ufw reload |
|
| 233 |
+ $ sudo ufw reload |
|
| 234 | 234 |
|
| 235 | 235 |
7. Allow incoming connections on the Docker port. |
| 236 | 236 |
|
| 237 |
- $ sudo ufw allow 2375/tcp |
|
| 237 |
+ $ sudo ufw allow 2375/tcp |
|
| 238 | 238 |
|
| 239 | 239 |
### Configure a DNS server for use by Docker |
| 240 | 240 |
|
| ... | ... |
@@ -262,25 +262,25 @@ To specify a DNS server for use by Docker: |
| 262 | 262 |
|
| 263 | 263 |
2. Open the `/etc/default/docker` file for editing. |
| 264 | 264 |
|
| 265 |
- $ sudo nano /etc/default/docker |
|
| 265 |
+ $ sudo nano /etc/default/docker |
|
| 266 | 266 |
|
| 267 | 267 |
3. Add a setting for Docker. |
| 268 | 268 |
|
| 269 |
- DOCKER_OPTS="--dns 8.8.8.8" |
|
| 269 |
+ DOCKER_OPTS="--dns 8.8.8.8" |
|
| 270 | 270 |
|
| 271 | 271 |
Replace `8.8.8.8` with a local DNS server such as `192.168.1.1`. You can also |
| 272 | 272 |
specify multiple DNS servers. Separated them with spaces, for example: |
| 273 | 273 |
|
| 274 |
- --dns 8.8.8.8 --dns 192.168.1.1 |
|
| 274 |
+ --dns 8.8.8.8 --dns 192.168.1.1 |
|
| 275 | 275 |
|
| 276 |
- >**Warning**: If you're doing this on a laptop which connects to various |
|
| 277 |
- >networks, make sure to choose a public DNS server. |
|
| 276 |
+ >**Warning**: If you're doing this on a laptop which connects to various |
|
| 277 |
+ >networks, make sure to choose a public DNS server. |
|
| 278 | 278 |
|
| 279 | 279 |
4. Save and close the file. |
| 280 | 280 |
|
| 281 | 281 |
5. Restart the Docker daemon. |
| 282 | 282 |
|
| 283 |
- $ sudo restart docker |
|
| 283 |
+ $ sudo restart docker |
|
| 284 | 284 |
|
| 285 | 285 |
|
| 286 | 286 |
|
| ... | ... |
@@ -291,22 +291,39 @@ NetworkManager (this might slow your network). |
| 291 | 291 |
|
| 292 | 292 |
1. Open the `/etc/NetworkManager/NetworkManager.conf` file for editing. |
| 293 | 293 |
|
| 294 |
- $ sudo nano /etc/NetworkManager/NetworkManager.conf |
|
| 294 |
+ $ sudo nano /etc/NetworkManager/NetworkManager.conf |
|
| 295 | 295 |
|
| 296 | 296 |
2. Comment out the `dns=dsnmasq` line: |
| 297 | 297 |
|
| 298 |
- dns=dnsmasq |
|
| 298 |
+ dns=dnsmasq |
|
| 299 | 299 |
|
| 300 | 300 |
3. Save and close the file. |
| 301 | 301 |
|
| 302 | 302 |
4. Restart both the NetworkManager and Docker. |
| 303 | 303 |
|
| 304 |
- $ sudo restart network-manager $ sudo restart docker |
|
| 304 |
+ $ sudo restart network-manager $ sudo restart docker |
|
| 305 | 305 |
|
| 306 | 306 |
|
| 307 | 307 |
## Upgrade Docker |
| 308 | 308 |
|
| 309 |
-To install the latest version of Docker, use the standard `-N` flag with `wget`: |
|
| 309 |
+To install the latest version of Docker with `wget`: |
|
| 310 | 310 |
|
| 311 |
- $ wget -qO- https://get.docker.com/ | sh |
|
| 311 |
+ $ wget -qO- https://get.docker.com/ | sh |
|
| 312 | 312 |
|
| 313 |
+## Uninstallation |
|
| 314 |
+ |
|
| 315 |
+To uninstall the Docker package: |
|
| 316 |
+ |
|
| 317 |
+ $ sudo apt-get purge lxc-docker |
|
| 318 |
+ |
|
| 319 |
+To uninstall the Docker package and dependencies that are no longer needed: |
|
| 320 |
+ |
|
| 321 |
+ $ sudo apt-get autoremove --purge lxc-docker |
|
| 322 |
+ |
|
| 323 |
+The above commands will not remove images, containers, volumes, or user created |
|
| 324 |
+configuration files on your host. If you wish to delete all images, containers, |
|
| 325 |
+and volumes run the following command: |
|
| 326 |
+ |
|
| 327 |
+ $ rm -rf /var/lib/docker |
|
| 328 |
+ |
|
| 329 |
+You must delete the user created configuration files manually. |
| ... | ... |
@@ -67,7 +67,7 @@ Boot2Docker command requires `ssh.exe` to be in the PATH, therefore we need to |
| 67 | 67 |
include `bin` folder of the Git installation (which has ssh.exe) to the `%PATH%` |
| 68 | 68 |
environment variable by running: |
| 69 | 69 |
|
| 70 |
- set PATH=%PATH%;"c:\Program Files (x86)\Git\bin" |
|
| 70 |
+ set PATH=%PATH%;"c:\Program Files (x86)\Git\bin" |
|
| 71 | 71 |
|
| 72 | 72 |
and then we can run the `boot2docker start` command to start the Boot2Docker VM. |
| 73 | 73 |
(Run `boot2docker init` command if you get an error saying machine does not |
| ... | ... |
@@ -81,7 +81,7 @@ to your console window and you are ready to run docker commands such as |
| 81 | 81 |
|
| 82 | 82 |
Launch a PowerShell window, then you need to add `ssh.exe` to your PATH: |
| 83 | 83 |
|
| 84 |
- $Env:Path = "${Env:Path};c:\Program Files (x86)\Git\bin"
|
|
| 84 |
+ $Env:Path = "${Env:Path};c:\Program Files (x86)\Git\bin"
|
|
| 85 | 85 |
|
| 86 | 86 |
and after running `boot2docker start` command it will print PowerShell commands |
| 87 | 87 |
to set the environment variables to connect Docker running inside VM. Run these |
| ... | ... |
@@ -150,6 +150,12 @@ You can do this with |
| 150 | 150 |
- then click: "Save Private Key". |
| 151 | 151 |
- Then use the saved file to login with PuTTY using `docker@127.0.0.1:2022`. |
| 152 | 152 |
|
| 153 |
+## Uninstallation |
|
| 154 |
+ |
|
| 155 |
+You can uninstall Boot2Docker using Window's standard process for removing programs. |
|
| 156 |
+This process does not remove the `docker-install.exe` file. You must delete that file |
|
| 157 |
+yourself. |
|
| 158 |
+ |
|
| 153 | 159 |
## References |
| 154 | 160 |
|
| 155 | 161 |
If you have Docker hosts running and if you don't wish to do a |