Signed-off-by: Mary Anthony <mary@docker.com>
| ... | ... |
@@ -10,37 +10,34 @@ parent = "smn_engine" |
| 10 | 10 |
|
| 11 | 11 |
# Mac OS X |
| 12 | 12 |
|
| 13 |
-You can install Docker using Boot2Docker to run `docker` commands at your command-line. |
|
| 14 |
-Choose this installation if you are familiar with the command-line or plan to |
|
| 15 |
-contribute to the Docker project on GitHub. |
|
| 13 |
+> **Note**: This release of Docker deprecates the Boot2Docker command line in |
|
| 14 |
+> favor of Docker Machine. Use the Docker Toolbox to install Docker Machine as |
|
| 15 |
+> well as the other Docker tools. |
|
| 16 | 16 |
|
| 17 |
-[<img src="/installation/images/kitematic.png" alt="Download Kitematic" |
|
| 18 |
-style="float:right;">](https://kitematic.com/download) |
|
| 17 |
+You install Docker using Docker Toolbox. Docker Toolbox includes the following Docker tools: |
|
| 19 | 18 |
|
| 20 |
-Alternatively, you may want to try <a id="inlinelink" href="https://kitematic.com/" |
|
| 21 |
-target="_blank">Kitematic</a>, an application that lets you set up Docker and |
|
| 22 |
-run containers using a graphical user interface (GUI). |
|
| 23 |
- |
|
| 24 |
-## Command-line Docker with Boot2Docker |
|
| 19 |
+* Docker Machine for running the `docker-machine` binary |
|
| 20 |
+* Docker Engine for running the `docker` binary |
|
| 21 |
+* Docker Compose for running the `docker-compose` binary |
|
| 22 |
+* Kitematic, the Docker GUI |
|
| 23 |
+* a shell preconfigured for a Docker command-line environment |
|
| 24 |
+* Oracle VM VirtualBox |
|
| 25 | 25 |
|
| 26 | 26 |
Because the Docker daemon uses Linux-specific kernel features, you can't run |
| 27 |
-Docker natively in OS X. Instead, you must install the Boot2Docker application. |
|
| 28 |
-The application includes a VirtualBox Virtual Machine (VM), Docker itself, and the |
|
| 29 |
-Boot2Docker management tool. |
|
| 30 |
- |
|
| 31 |
-The Boot2Docker management tool is a lightweight Linux virtual machine made |
|
| 32 |
-specifically to run the Docker daemon on Mac OS X. The VirtualBox VM runs |
|
| 33 |
-completely from RAM, is a small ~24MB download, and boots in approximately 5s. |
|
| 27 |
+Docker natively in OS X. Instead, you must use `docker-machine` to create and |
|
| 28 |
+attach to a virtual machine (VM). This machine is a Linux VM that hosts Docker |
|
| 29 |
+for you on your Mac. |
|
| 34 | 30 |
|
| 35 | 31 |
**Requirements** |
| 36 | 32 |
|
| 37 |
-Your Mac must be running OS X 10.6 "Snow Leopard" or newer to run Boot2Docker. |
|
| 33 |
+Your Mac must be running OS X 10.8 "Mountain Lion" or newer to install the |
|
| 34 |
+Docker Toolbox. |
|
| 38 | 35 |
|
| 39 | 36 |
### Learn the key concepts before installing |
| 40 | 37 |
|
| 41 |
-In a Docker installation on Linux, your machine is both the localhost and the |
|
| 42 |
-Docker host. In networking, localhost means your computer. The Docker host is |
|
| 43 |
-the machine on which the containers run. |
|
| 38 |
+In a Docker installation on Linux, your physical machine is both the localhost |
|
| 39 |
+and the Docker host. In networking, localhost means your computer. The Docker |
|
| 40 |
+host is the computer on which the containers run. |
|
| 44 | 41 |
|
| 45 | 42 |
On a typical Linux installation, the Docker client, the Docker daemon, and any |
| 46 | 43 |
containers run directly on your localhost. This means you can address ports on a |
| ... | ... |
@@ -49,135 +46,229 @@ Docker container using standard localhost addressing such as `localhost:8000` or |
| 49 | 49 |
|
| 50 | 50 |
 |
| 51 | 51 |
|
| 52 |
-In an OS X installation, the `docker` daemon is running inside a Linux virtual |
|
| 53 |
-machine provided by Boot2Docker. |
|
| 52 |
+In an OS X installation, the `docker` daemon is running inside a Linux VM called |
|
| 53 |
+`docker-vm`. The `docker-vm` is a lightweight Linux VM made specifically to run |
|
| 54 |
+the Docker daemon on Mac OS X. The VM runs completely from RAM, is a small ~24MB |
|
| 55 |
+download, and boots in approximately 5s. |
|
| 54 | 56 |
|
| 55 | 57 |
 |
| 56 | 58 |
|
| 57 |
-In OS X, the Docker host address is the address of the Linux VM. |
|
| 58 |
-When you start the `boot2docker` process, the VM is assigned an IP address. Under |
|
| 59 |
-`boot2docker` ports on a container map to ports on the VM. To see this in |
|
| 59 |
+In OS X, the Docker host address is the address of the Linux VM. When you start |
|
| 60 |
+the VM with `docker-machine` it is assigned an IP address. When you start a |
|
| 61 |
+container, the ports on a container map to ports on the VM. To see this in |
|
| 60 | 62 |
practice, work through the exercises on this page. |
| 61 | 63 |
|
| 62 | 64 |
|
| 63 | 65 |
### Installation |
| 64 | 66 |
|
| 65 |
-1. Go to the [boot2docker/osx-installer ]( |
|
| 66 |
- https://github.com/boot2docker/osx-installer/releases/latest) release page. |
|
| 67 |
- |
|
| 68 |
-4. Download Boot2Docker by clicking `Boot2Docker-x.x.x.pkg` in the "Downloads" |
|
| 69 |
- section. |
|
| 70 |
- |
|
| 71 |
-3. Install Boot2Docker by double-clicking the package. |
|
| 72 |
- |
|
| 73 |
- The installer places Boot2Docker and VirtualBox in your "Applications" folder. |
|
| 74 |
- |
|
| 75 |
-The installation places the `docker` and `boot2docker` binaries in your |
|
| 76 |
-`/usr/local/bin` directory. |
|
| 77 |
- |
|
| 78 |
- |
|
| 79 |
-## Start the Boot2Docker Application |
|
| 80 |
- |
|
| 81 |
-To run a Docker container, you first start the `boot2docker` VM and then issue |
|
| 82 |
-`docker` commands to create, load, and manage containers. You can launch |
|
| 83 |
-`boot2docker` from your Applications folder or from the command line. |
|
| 67 |
+If you have VirtualBox running, you must shut it down before running the |
|
| 68 |
+installer. |
|
| 84 | 69 |
|
| 85 |
-> **NOTE**: Boot2Docker is designed as a development tool. You should not use |
|
| 86 |
-> it in production environments. |
|
| 70 |
+1. Go to the [Docker Toolbox](https://www.docker.com/toolbox) page. |
|
| 87 | 71 |
|
| 88 |
-### From the Applications folder |
|
| 72 |
+2. Click the installer link to download. |
|
| 89 | 73 |
|
| 90 |
-When you launch the "Boot2Docker" application from your "Applications" folder, the |
|
| 91 |
-application: |
|
| 74 |
+3. Install Docker Toolbox by double-clicking the package or by right-clicking |
|
| 75 |
+and choosing "Open" from the pop-up menu. |
|
| 92 | 76 |
|
| 93 |
-* opens a terminal window |
|
| 77 |
+ The installer launches the "Install Docker Toolbox" dialog. |
|
| 78 |
+ |
|
| 79 |
+  |
|
| 94 | 80 |
|
| 95 |
-* creates a $HOME/.boot2docker directory |
|
| 81 |
+4. Press "Continue" to install the toolbox. |
|
| 96 | 82 |
|
| 97 |
-* creates a VirtualBox ISO and certs |
|
| 83 |
+ The installer presents you with options to customize the standard |
|
| 84 |
+ installation. |
|
| 85 |
+ |
|
| 86 |
+  |
|
| 87 |
+ |
|
| 88 |
+ By default, the standard Docker Toolbox installation: |
|
| 89 |
+ |
|
| 90 |
+ * installs binaries for the Docker tools in `/usr/local/bin` |
|
| 91 |
+ * makes these binaries available to all users |
|
| 92 |
+ * updates any existing VirtualBox installation |
|
| 93 |
+ |
|
| 94 |
+ Change these defaults by pressing "Customize" or "Change |
|
| 95 |
+ Install Location." |
|
| 98 | 96 |
|
| 99 |
-* starts a VirtualBox VM running the `docker` daemon |
|
| 97 |
+5. Press "Install" to perform the standard installation. |
|
| 100 | 98 |
|
| 101 |
-Once the launch completes, you can run `docker` commands. A good way to verify |
|
| 102 |
-your setup succeeded is to run the `hello-world` container. |
|
| 99 |
+ The system prompts you for your password. |
|
| 100 |
+ |
|
| 101 |
+  |
|
| 102 |
+ |
|
| 103 |
+6. Provide your password to continue with the installation. |
|
| 103 | 104 |
|
| 104 |
- $ docker run hello-world |
|
| 105 |
- Unable to find image 'hello-world:latest' locally |
|
| 106 |
- 511136ea3c5a: Pull complete |
|
| 107 |
- 31cbccb51277: Pull complete |
|
| 108 |
- e45a5af57b00: Pull complete |
|
| 109 |
- hello-world:latest: The image you are pulling has been verified. |
|
| 110 |
- Important: image verification is a tech preview feature and should not be |
|
| 111 |
- relied on to provide security. |
|
| 112 |
- Status: Downloaded newer image for hello-world:latest |
|
| 113 |
- Hello from Docker. |
|
| 114 |
- This message shows that your installation appears to be working correctly. |
|
| 105 |
+ When it completes, the installer provides you with some information you can |
|
| 106 |
+ use to complete some common tasks. |
|
| 107 |
+ |
|
| 108 |
+  |
|
| 109 |
+ |
|
| 110 |
+7. Press "Close" to exit. |
|
| 115 | 111 |
|
| 116 |
- To generate this message, Docker took the following steps: |
|
| 117 |
- 1. The Docker client contacted the Docker daemon. |
|
| 118 |
- 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. |
|
| 119 |
- (Assuming it was not already locally available.) |
|
| 120 |
- 3. The Docker daemon created a new container from that image which runs the |
|
| 121 |
- executable that produces the output you are currently reading. |
|
| 122 |
- 4. The Docker daemon streamed that output to the Docker client, which sent it |
|
| 123 |
- to your terminal. |
|
| 124 | 112 |
|
| 125 |
- To try something more ambitious, you can run an Ubuntu container with: |
|
| 126 |
- $ docker run -it ubuntu bash |
|
| 113 |
+## Running a Docker Container |
|
| 127 | 114 |
|
| 128 |
- For more examples and ideas, visit: |
|
| 129 |
- http://docs.docker.com/userguide/ |
|
| 115 |
+To run a Docker container, you: |
|
| 130 | 116 |
|
| 117 |
+* create a new (or start an existing) Docker virtual machine |
|
| 118 |
+* switch your environment to your new VM |
|
| 119 |
+* use the `docker` client to create, load, and manage containers |
|
| 131 | 120 |
|
| 132 |
-A more typical way to start and stop `boot2docker` is using the command line. |
|
| 121 |
+Once you create a machine, you can reuse it as often as you like. Like any |
|
| 122 |
+VirtualBox VM, it maintains its configuration between uses. |
|
| 133 | 123 |
|
| 134 |
-### From your command line |
|
| 124 |
+There are two ways to use the installed tools, from the Docker Quickstart Terminal or |
|
| 125 |
+[from your shell](#from-your-shell). |
|
| 135 | 126 |
|
| 136 |
-Initialize and run `boot2docker` from the command line, do the following: |
|
| 127 |
+### From the Docker Quickstart Terminal |
|
| 137 | 128 |
|
| 138 |
-1. Create a new Boot2Docker VM. |
|
| 129 |
+1. Open the "Applications" folder or the "Launchpad". |
|
| 139 | 130 |
|
| 140 |
- $ boot2docker init |
|
| 131 |
+2. Find the Docker Quickstart Terminal and double-click to launch it. |
|
| 141 | 132 |
|
| 142 |
- This creates a new virtual machine. You only need to run this command once. |
|
| 133 |
+ The application: |
|
| 143 | 134 |
|
| 144 |
-2. Start the `boot2docker` VM. |
|
| 135 |
+ * opens a terminal window |
|
| 136 |
+ * creates a VM called `docker-vm` if it doesn't exists, starts the VM if it does |
|
| 137 |
+ * points the terminal environment to this VM |
|
| 145 | 138 |
|
| 146 |
- $ boot2docker start |
|
| 139 |
+ Once the launch completes, the Docker Quickstart Terminal reports: |
|
| 140 |
+ |
|
| 141 |
+  |
|
| 142 |
+ |
|
| 143 |
+ Now, you can run `docker` commands. |
|
| 147 | 144 |
|
| 148 |
-3. Display the environment variables for the Docker client. |
|
| 145 |
+3. Verify your setup succeeded by running the `hello-world` container. |
|
| 149 | 146 |
|
| 150 |
- $ boot2docker shellinit |
|
| 151 |
- Writing /Users/mary/.boot2docker/certs/boot2docker-vm/ca.pem |
|
| 152 |
- Writing /Users/mary/.boot2docker/certs/boot2docker-vm/cert.pem |
|
| 153 |
- Writing /Users/mary/.boot2docker/certs/boot2docker-vm/key.pem |
|
| 154 |
- export DOCKER_HOST=tcp://192.168.59.103:2376 |
|
| 155 |
- export DOCKER_CERT_PATH=/Users/mary/.boot2docker/certs/boot2docker-vm |
|
| 156 |
- export DOCKER_TLS_VERIFY=1 |
|
| 157 |
- |
|
| 158 |
- The specific paths and address on your machine will be different. |
|
| 159 |
- |
|
| 160 |
-4. To set the environment variables in your shell do the following: |
|
| 161 |
- |
|
| 162 |
- $ eval "$(boot2docker shellinit)" |
|
| 163 |
- |
|
| 164 |
- You can also set them manually by using the `export` commands `boot2docker` |
|
| 165 |
- returns. |
|
| 147 |
+ $ docker run hello-world |
|
| 148 |
+ Unable to find image 'hello-world:latest' locally |
|
| 149 |
+ 511136ea3c5a: Pull complete |
|
| 150 |
+ 31cbccb51277: Pull complete |
|
| 151 |
+ e45a5af57b00: Pull complete |
|
| 152 |
+ hello-world:latest: The image you are pulling has been verified. |
|
| 153 |
+ Important: image verification is a tech preview feature and should not be |
|
| 154 |
+ relied on to provide security. |
|
| 155 |
+ Status: Downloaded newer image for hello-world:latest |
|
| 156 |
+ Hello from Docker. |
|
| 157 |
+ This message shows that your installation appears to be working correctly. |
|
| 158 |
+ |
|
| 159 |
+ To generate this message, Docker took the following steps: |
|
| 160 |
+ 1. The Docker client contacted the Docker daemon. |
|
| 161 |
+ 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. |
|
| 162 |
+ (Assuming it was not already locally available.) |
|
| 163 |
+ 3. The Docker daemon created a new container from that image which runs the |
|
| 164 |
+ executable that produces the output you are currently reading. |
|
| 165 |
+ 4. The Docker daemon streamed that output to the Docker client, which sent it |
|
| 166 |
+ to your terminal. |
|
| 167 |
+ |
|
| 168 |
+ To try something more ambitious, you can run an Ubuntu container with: |
|
| 169 |
+ $ docker run -it ubuntu bash |
|
| 170 |
+ |
|
| 171 |
+ For more examples and ideas, visit: |
|
| 172 |
+ http://docs.docker.com/userguide/ |
|
| 173 |
+ |
|
| 174 |
+ |
|
| 175 |
+A more typical way to interact with the Docker tools is from your regular shell command line. |
|
| 176 |
+ |
|
| 177 |
+### From your shell |
|
| 178 |
+ |
|
| 179 |
+This section assumes you are running a Bash shell. You may be running a |
|
| 180 |
+different shell such as C Shell but the commands are the same. |
|
| 181 |
+ |
|
| 182 |
+1. Create a new Docker VM. |
|
| 183 |
+ |
|
| 184 |
+ $ docker-machine create --driver virtualbox docker-vm |
|
| 185 |
+ Creating VirtualBox VM... |
|
| 186 |
+ Creating SSH key... |
|
| 187 |
+ Starting VirtualBox VM... |
|
| 188 |
+ Starting VM... |
|
| 189 |
+ To see how to connect Docker to this machine, run: docker-machine env docker-vm |
|
| 190 |
+ |
|
| 191 |
+ This creates a new `docker-vm` in VirtualBox. |
|
| 192 |
+ |
|
| 193 |
+  |
|
| 194 |
+ |
|
| 195 |
+ The command also creates a machine configuration in the |
|
| 196 |
+ `~/.docker/machine/machines/docker-vm` directory. You only need to run the |
|
| 197 |
+ `create` command once. Then, you can use `docker-machine` to start, stop, |
|
| 198 |
+ query, and otherwise manage the VM from the command line. |
|
| 199 |
+ |
|
| 200 |
+2. List your available machines. |
|
| 201 |
+ |
|
| 202 |
+ $ docker-machine ls |
|
| 203 |
+ NAME ACTIVE DRIVER STATE URL SWARM |
|
| 204 |
+ docker-vm * virtualbox Running tcp://192.168.99.101:2376 |
|
| 205 |
+ |
|
| 206 |
+ If you have previously installed the deprecated Boot2Docker application or |
|
| 207 |
+ run the Docker Quickstart Terminal, you may have a `dev` VM as well. When you |
|
| 208 |
+ created `docker-vm`, the `docker-machine` command provided instructions |
|
| 209 |
+ for learning how to connect the VM. |
|
| 210 |
+ |
|
| 211 |
+3. Get the environment commands for your new VM. |
|
| 212 |
+ |
|
| 213 |
+ $ docker-machine env docker-vm |
|
| 214 |
+ export DOCKER_TLS_VERIFY="1" |
|
| 215 |
+ export DOCKER_HOST="tcp://192.168.99.101:2376" |
|
| 216 |
+ export DOCKER_CERT_PATH="/Users/mary/.docker/machine/machines/docker-vm" |
|
| 217 |
+ export DOCKER_MACHINE_NAME="docker-vm" |
|
| 218 |
+ # Run this command to configure your shell: |
|
| 219 |
+ # eval "$(docker-machine env docker-vm)" |
|
| 220 |
+ |
|
| 221 |
+4. Connect your shell to the `docker-vm` machine. |
|
| 222 |
+ |
|
| 223 |
+ $ eval "$(docker-machine env docker-vm)" |
|
| 166 | 224 |
|
| 167 | 225 |
5. Run the `hello-world` container to verify your setup. |
| 168 | 226 |
|
| 169 | 227 |
$ docker run hello-world |
| 170 | 228 |
|
| 171 | 229 |
|
| 172 |
-## Basic Boot2Docker exercises |
|
| 173 |
- |
|
| 174 |
-At this point, you should have `boot2docker` running and the `docker` client |
|
| 175 |
-environment initialized. To verify this, run the following commands: |
|
| 176 |
- |
|
| 177 |
- $ boot2docker status |
|
| 178 |
- $ docker version |
|
| 179 |
- |
|
| 180 |
-Work through this section to try some practical container tasks using `boot2docker` VM. |
|
| 230 |
+## Learn about your Toolbox installation |
|
| 231 |
+ |
|
| 232 |
+Toolbox installs the Docker Engine binary, the Docker binary on your system. When you |
|
| 233 |
+use the Docker Quickstart Terminal or create a `docker-vm` manually, Docker |
|
| 234 |
+Machine updates the `~/.docker/machine/machines/docker-vm` folder to your |
|
| 235 |
+system. This folder contains the configuration for the VM. |
|
| 236 |
+ |
|
| 237 |
+You can create multiple VMs on your system with Docker Machine. So, you may have |
|
| 238 |
+more than one VM folder if you have more than one VM. To remove a VM, use the |
|
| 239 |
+`docker-machine rm <machine-name>` command. |
|
| 240 |
+ |
|
| 241 |
+The `docker-machine` subcommands are slightly different than the `boot2docker` |
|
| 242 |
+subcommands. The table below lists the equivalent `docker-machine` subcommand |
|
| 243 |
+and what it does: |
|
| 244 |
+ |
|
| 245 |
+| `boot2docker` | `docker-machine` | `docker-machine` description | |
|
| 246 |
+|----------------|------------------|----------------------------------------------------------| |
|
| 247 |
+| init | create | Creates a new docker host. | |
|
| 248 |
+| up | start | Starts a stopped machine. | |
|
| 249 |
+| ssh | ssh | Runs a command or interactive ssh session on the machine.| |
|
| 250 |
+| save | - | Not applicable. | |
|
| 251 |
+| down | stop | Stops a running machine. | |
|
| 252 |
+| poweroff | stop | Stops a running machine. | |
|
| 253 |
+| reset | restart | Restarts a running machine. | |
|
| 254 |
+| config | inspect | Prints machine configuration details. | |
|
| 255 |
+| status | ls | Lists all machines and their status. | |
|
| 256 |
+| info | inspect | Displays a machine's details. | |
|
| 257 |
+| ip | ip | Displays the machine's ip address. | |
|
| 258 |
+| shellinit | env | Displays shell commands needed to configure your shell to interact with a machine | |
|
| 259 |
+| delete | rm | Removes a machine. | |
|
| 260 |
+| download | - | Not applicable. | |
|
| 261 |
+| upgrade | upgrade | Upgrades a machine's Docker client to the latest stable release. | |
|
| 262 |
+ |
|
| 263 |
+ |
|
| 264 |
+## Example of Docker on Mac OS X |
|
| 265 |
+ |
|
| 266 |
+Work through this section to try some practical container tasks on a VM. At this |
|
| 267 |
+point, you should have a VM running and be connected to it through your shell. |
|
| 268 |
+To verify this, run the following commands: |
|
| 269 |
+ |
|
| 270 |
+ $ docker-machine ls |
|
| 271 |
+ NAME ACTIVE DRIVER STATE URL SWARM |
|
| 272 |
+ dev * virtualbox Running tcp://192.168.99.100:2376 |
|
| 273 |
+ |
|
| 274 |
+The `ACTIVE` machine, in this case `dev`, is the one your environment is pointing to. |
|
| 181 | 275 |
|
| 182 | 276 |
### Access container ports |
| 183 | 277 |
|
| ... | ... |
@@ -212,11 +303,11 @@ Work through this section to try some practical container tasks using `boot2dock |
| 212 | 212 |
|
| 213 | 213 |
This didn't work. The reason it doesn't work is your `DOCKER_HOST` address is |
| 214 | 214 |
not the localhost address (0.0.0.0) but is instead the address of the |
| 215 |
- `boot2docker` VM. |
|
| 215 |
+ your Docker VM. |
|
| 216 | 216 |
|
| 217 |
-5. Get the address of the `boot2docker` VM. |
|
| 217 |
+5. Get the address of the `dev` VM. |
|
| 218 | 218 |
|
| 219 |
- $ boot2docker ip |
|
| 219 |
+ $ docker-machine ip dev |
|
| 220 | 220 |
192.168.59.103 |
| 221 | 221 |
|
| 222 | 222 |
6. Enter the `http://192.168.59.103:49157` address in your browser: |
| ... | ... |
@@ -232,7 +323,7 @@ Work through this section to try some practical container tasks using `boot2dock |
| 232 | 232 |
|
| 233 | 233 |
### Mount a volume on the container |
| 234 | 234 |
|
| 235 |
-When you start `boot2docker`, it automatically shares your `/Users` directory |
|
| 235 |
+When you start a container it automatically shares your `/Users/username` directory |
|
| 236 | 236 |
with the VM. You can use this share point to mount directories onto your container. |
| 237 | 237 |
The next exercise demonstrates how to do this. |
| 238 | 238 |
|
| ... | ... |
@@ -274,85 +365,53 @@ The next exercise demonstrates how to do this. |
| 274 | 274 |
|
| 275 | 275 |
 |
| 276 | 276 |
|
| 277 |
-9. Stop and then remove your running `mysite` container. |
|
| 277 |
+10. Stop and then remove your running `mysite` container. |
|
| 278 | 278 |
|
| 279 | 279 |
$ docker stop mysite |
| 280 | 280 |
$ docker rm mysite |
| 281 | 281 |
|
| 282 |
-## Upgrade Boot2Docker |
|
| 283 |
- |
|
| 284 |
-If you running Boot2Docker 1.4.1 or greater, you can upgrade Boot2Docker from |
|
| 285 |
-the command line. If you are running an older version, you should use the |
|
| 286 |
-package provided by the `boot2docker` repository. |
|
| 287 |
- |
|
| 288 |
-### From the command line |
|
| 289 |
- |
|
| 290 |
-To upgrade from 1.4.1 or greater, you can do this: |
|
| 291 |
- |
|
| 292 |
-1. Open a terminal on your local machine. |
|
| 293 |
- |
|
| 294 |
-2. Stop the `boot2docker` application. |
|
| 295 |
- |
|
| 296 |
- $ boot2docker stop |
|
| 297 |
- |
|
| 298 |
-3. Run the upgrade command. |
|
| 299 |
- |
|
| 300 |
- $ boot2docker upgrade |
|
| 301 |
- |
|
| 302 |
- |
|
| 303 |
-### Use the installer |
|
| 304 |
- |
|
| 305 |
-To upgrade any version of Boot2Docker, do this: |
|
| 306 |
- |
|
| 307 |
-1. Open a terminal on your local machine. |
|
| 308 |
- |
|
| 309 |
-2. Stop the `boot2docker` application. |
|
| 310 |
- |
|
| 311 |
- $ boot2docker stop |
|
| 312 |
- |
|
| 313 |
-3. Go to the [boot2docker/osx-installer ]( |
|
| 314 |
- https://github.com/boot2docker/osx-installer/releases/latest) release page. |
|
| 315 |
- |
|
| 316 |
-4. Download Boot2Docker by clicking `Boot2Docker-x.x.x.pkg` in the "Downloads" |
|
| 317 |
- section. |
|
| 318 |
- |
|
| 319 |
-2. Install Boot2Docker by double-clicking the package. |
|
| 320 |
- |
|
| 321 |
- The installer places Boot2Docker in your "Applications" folder. |
|
| 322 |
- |
|
| 323 | 282 |
|
| 324 |
-## Uninstallation |
|
| 283 |
+## Upgrade Docker Toolbox |
|
| 325 | 284 |
|
| 326 |
-1. Go to the [boot2docker/osx-installer ]( |
|
| 327 |
- https://github.com/boot2docker/osx-installer/releases/latest) release page. |
|
| 285 |
+To upgrade Docker Toolbox, download an re-run [the Docker Toolbox |
|
| 286 |
+installer](https://docker.com/toolbox/). |
|
| 328 | 287 |
|
| 329 |
-2. Download the source code by clicking `Source code (zip)` or |
|
| 330 |
- `Source code (tar.gz)` in the "Downloads" section. |
|
| 331 | 288 |
|
| 332 |
-3. Extract the source code. |
|
| 289 |
+## Uninstall Docker Toolbox |
|
| 333 | 290 |
|
| 334 |
-4. Open a terminal on your local machine. |
|
| 291 |
+To uninstall, do the following: |
|
| 335 | 292 |
|
| 336 |
-5. Change to the directory where you extracted the source code: |
|
| 293 |
+1. List your machines. |
|
| 337 | 294 |
|
| 338 |
- $ cd <path to extracted source code> |
|
| 295 |
+ $ docker-machine ls |
|
| 296 |
+ NAME ACTIVE DRIVER STATE URL SWARM |
|
| 297 |
+ dev * virtualbox Running tcp://192.168.99.100:2376 |
|
| 298 |
+ my-docker-machine virtualbox Stopped |
|
| 299 |
+ docker-vm virtualbox Stopped |
|
| 339 | 300 |
|
| 340 |
-6. Make sure the uninstall.sh script is executable: |
|
| 301 |
+2. Remove each machine. |
|
| 341 | 302 |
|
| 342 |
- $ chmod +x uninstall.sh |
|
| 303 |
+ $ docker-machine rm dev |
|
| 304 |
+ Successfully removed dev |
|
| 305 |
+ |
|
| 306 |
+ Removing a machine deletes its VM from VirtualBox and from the |
|
| 307 |
+ `~/.docker/machine/machines` directory. |
|
| 343 | 308 |
|
| 344 |
-7. Run the uninstall.sh script: |
|
| 309 |
+3. Remove the Docker Quickstart Terminal and Kitematic from your "Applications" folder. |
|
| 345 | 310 |
|
| 346 |
- $ ./uninstall.sh |
|
| 311 |
+4. Remove the `docker`, `docker-compose`, and `docker-machine` commands from the `/usr/local/bin` folder. |
|
| 347 | 312 |
|
| 313 |
+ $ rm /usr/local/bin/docker |
|
| 314 |
+ |
|
| 315 |
+5. Delete the `~/.docker` folder from your system. |
|
| 348 | 316 |
|
| 349 |
-## Learning more and acknowledgement |
|
| 350 | 317 |
|
| 351 |
-Use `boot2docker help` to list the full command line reference. For more |
|
| 352 |
-information about using SSH or SCP to access the Boot2Docker VM, see the README |
|
| 353 |
-at [Boot2Docker repository](https://github.com/boot2docker/boot2docker). |
|
| 318 |
+## Learning more |
|
| 354 | 319 |
|
| 355 |
-Thanks to Chris Jones whose [blog](http://viget.com/extend/how-to-use-docker-on-os-x-the-missing-guide) |
|
| 356 |
-inspired me to redo this page. |
|
| 320 |
+Use `docker-machine help` to list the full command line reference for Docker Machine. For more |
|
| 321 |
+information about using SSH or SCP to access a VM, see [the Docker Machine |
|
| 322 |
+documentation](https://docs.docker.com/machine/). |
|
| 357 | 323 |
|
| 358 |
-Continue with the [Docker User Guide](/userguide). |
|
| 324 |
+You can continue with the [Docker User Guide](/userguide). If you are |
|
| 325 |
+interested in using the Kitematic GUI, see the [Kitermatic user |
|
| 326 |
+guide](/kitematic/userguide/). |
| ... | ... |
@@ -9,122 +9,309 @@ parent = "smn_engine" |
| 9 | 9 |
<![end-metadata]--> |
| 10 | 10 |
|
| 11 | 11 |
# Windows |
| 12 |
-> **Note:** |
|
| 13 |
-> Docker has been tested on Windows 7 and 8.1; it may also run on older versions. |
|
| 14 |
-> Your processor needs to support hardware virtualization. |
|
| 15 | 12 |
|
| 16 |
-The Docker Engine uses Linux-specific kernel features, so to run it on Windows |
|
| 17 |
-we need to use a lightweight virtual machine (VM). You use the **Windows Docker |
|
| 18 |
-Client** to control the virtualized Docker Engine to build, run, and manage |
|
| 19 |
-Docker containers. |
|
| 13 |
+> **Note**: This release of Docker deprecates the Boot2Docker command line in |
|
| 14 |
+> favor of Docker Machine. Use the Docker Toolbox to install Docker Machine as |
|
| 15 |
+> well as the other Docker tools. |
|
| 20 | 16 |
|
| 21 |
-To make this process easier, we've designed a helper application called |
|
| 22 |
-[Boot2Docker](https://github.com/boot2docker/boot2docker) which creates a Linux virtual |
|
| 23 |
-machine on Windows to run Docker on a Linux operating system. |
|
| 17 |
+You install Docker using Docker Toolbox. Docker Toolbox includes the following Docker tools: |
|
| 24 | 18 |
|
| 25 |
-Although you will be using Windows Docker client, the docker engine hosting the |
|
| 26 |
-containers will still be running on Linux. Until the Docker engine for Windows |
|
| 27 |
-is developed, you can launch only Linux containers from your Windows machine. |
|
| 19 |
+* Docker Machine for running the `docker-machine` binary |
|
| 20 |
+* Docker Engine for running the `docker` binary |
|
| 21 |
+* Kitematic, the Docker GUI |
|
| 22 |
+* a shell preconfigured for a Docker command-line environment |
|
| 23 |
+* Oracle VM VirtualBox |
|
| 24 |
+ |
|
| 25 |
+Because the Docker daemon uses Linux-specific kernel features, you can't run |
|
| 26 |
+Docker natively in Windows. Instead, you must use `docker-machine` to create and attach to a Docker VM on your machine. This VM hosts Docker for you on your Windows system. |
|
| 27 |
+ |
|
| 28 |
+The Docker VM is lightweight Linux virtual machine made specifically to run the |
|
| 29 |
+Docker daemon on Windows. The VirtualBox VM runs completely from RAM, is a |
|
| 30 |
+small ~24MB download, and boots in approximately 5s. |
|
| 31 |
+ |
|
| 32 |
+ |
|
| 33 |
+ |
|
| 34 |
+## Requirements |
|
| 35 |
+ |
|
| 36 |
+Your machine must be running Windows 7.1, 8/8.1 or newer to run Docker. |
|
| 37 |
+To find out what version of Windows you have: |
|
| 38 |
+ |
|
| 39 |
+1. Right click the Windows message and choose **System**. |
|
| 40 |
+ |
|
| 41 |
+  |
|
| 42 |
+ |
|
| 43 |
+ If you aren't using a supported version, you could consider upgrading your |
|
| 44 |
+ operating system. |
|
| 45 |
+ |
|
| 46 |
+2. Make sure your Windows system supports Hardware Virtualization Technology and that virtualization is enabled. |
|
| 47 |
+ |
|
| 48 |
+ #### For Windows 8 or 8.1 |
|
| 49 |
+ |
|
| 50 |
+ Choose **Start > Task Manager** and navigate to the **Performance** tab. |
|
| 51 |
+ Under **CPU** you should see the following: |
|
| 52 |
+ |
|
| 53 |
+  |
|
| 54 |
+ |
|
| 55 |
+ If virtualization is not enabled on your system, follow the manufacturer's instructions for enabling it. |
|
| 56 |
+ |
|
| 57 |
+ ### For Windows 7 |
|
| 58 |
+ |
|
| 59 |
+ Run the <a |
|
| 60 |
+ href="http://www.microsoft.com/en-us/download/details.aspx?id=592" |
|
| 61 |
+ target="_blank"> Microsoft® Hardware-Assisted Virtualization Detection |
|
| 62 |
+ Tool</a> and follow the on-screen instructions. |
|
| 63 |
+ |
|
| 64 |
+ |
|
| 65 |
+> **Note**: If you have Docker hosts running and you don't wish to do a Docker Toolbox |
|
| 66 |
+installation, you can install the `docker.exe` using the *unofficial* Windows package |
|
| 67 |
+manager Chocolately. For information on how to do this, see [Docker package on |
|
| 68 |
+Chocolatey](http://chocolatey.org/packages/docker). |
|
| 69 |
+ |
|
| 70 |
+### Learn the key concepts before installing |
|
| 71 |
+ |
|
| 72 |
+In a Docker installation on Linux, your machine is both the localhost and the |
|
| 73 |
+Docker host. In networking, localhost means your computer. The Docker host is |
|
| 74 |
+the machine on which the containers run. |
|
| 75 |
+ |
|
| 76 |
+On a typical Linux installation, the Docker client, the Docker daemon, and any |
|
| 77 |
+containers run directly on your localhost. This means you can address ports on a |
|
| 78 |
+Docker container using standard localhost addressing such as `localhost:8000` or |
|
| 79 |
+`0.0.0.0:8376`. |
|
| 80 |
+ |
|
| 81 |
+ |
|
| 82 |
+ |
|
| 83 |
+In an Windows installation, the `docker` daemon is running inside a Linux virtual |
|
| 84 |
+machine. You use the Windows Docker client to talk to the Docker host VM. Your |
|
| 85 |
+Docker containers run inside this host. |
|
| 28 | 86 |
|
| 29 | 87 |
 |
| 30 | 88 |
|
| 31 |
-## Demonstration |
|
| 89 |
+In Windows, the Docker host address is the address of the Linux VM. When you |
|
| 90 |
+start the VM with `docker-machine` it is assigned an IP address. When you start |
|
| 91 |
+a container, the ports on a container map to ports on the VM. To see this in |
|
| 92 |
+practice, work through the exercises on this page. |
|
| 93 |
+ |
|
| 94 |
+ |
|
| 95 |
+### Installation |
|
| 96 |
+ |
|
| 97 |
+If you have VirtualBox running, you must shut it down before running the |
|
| 98 |
+installer. |
|
| 99 |
+ |
|
| 100 |
+1. Go to the [Docker Toolbox](https://www.docker.com/toolbox) page. |
|
| 101 |
+ |
|
| 102 |
+2. Click the installer link to download. |
|
| 103 |
+ |
|
| 104 |
+3. Install Docker Toolbox by double-clicking the installer. |
|
| 32 | 105 |
|
| 33 |
-<iframe width="640" height="480" src="//www.youtube.com/embed/TjMU3bDX4vo?rel=0" frameborder="0" allowfullscreen></iframe> |
|
| 106 |
+ The installer launches the "Setup - Docker Toolbox" dialog. |
|
| 107 |
+ |
|
| 108 |
+  |
|
| 34 | 109 |
|
| 35 |
-## Installation |
|
| 110 |
+4. Press "Next" to install the toolbox. |
|
| 36 | 111 |
|
| 37 |
-1. Download the latest release of the |
|
| 38 |
- [Docker for Windows Installer](https://github.com/boot2docker/windows-installer/releases/latest). |
|
| 39 |
-2. Run the installer, which will install Docker Client for Windows, VirtualBox, |
|
| 40 |
- Git for Windows (MSYS-git), the boot2docker Linux ISO, and the Boot2Docker |
|
| 41 |
- management tool. |
|
| 42 |
-  |
|
| 43 |
-3. Run the **Boot2Docker Start** shortcut from your Desktop or “Program Files → |
|
| 44 |
- Boot2Docker for Windows”. |
|
| 45 |
- The Start script will ask you to enter an ssh key passphrase - the simplest |
|
| 46 |
- (but least secure) is to just hit [Enter]. |
|
| 112 |
+ The installer presents you with options to customize the standard |
|
| 113 |
+ installation. By default, the standard Docker Toolbox installation: |
|
| 114 |
+ |
|
| 115 |
+ * installs executables for the Docker tools in `C:\Program Files\Docker Toolbox` |
|
| 116 |
+ * updates any existing VirtualBox installation |
|
| 117 |
+ * adds a Docker Inc. folder to your program shortcuts |
|
| 118 |
+ * updates your `PATH` environment variable |
|
| 119 |
+ * adds desktop icons for the Docker Quickstart Terminal and Kitematic |
|
| 47 | 120 |
|
| 48 |
-4. The **Boot2Docker Start** will start a unix shell already configured to manage |
|
| 49 |
- Docker running inside the virtual machine. Run `docker version` to see |
|
| 50 |
- if it is working correctly: |
|
| 121 |
+ This installation assumes the defaults are acceptable. |
|
| 51 | 122 |
|
| 52 |
- |
|
| 123 |
+5. Press "Next" until you reach the "Ready to Install" page. |
|
| 53 | 124 |
|
| 54 |
-## Running Docker |
|
| 125 |
+ The system prompts you for your password. |
|
| 126 |
+ |
|
| 127 |
+  |
|
| 128 |
+ |
|
| 129 |
+6. Press "Install" to continue with the installation. |
|
| 55 | 130 |
|
| 56 |
-> **Note:** if you are using a remote Docker daemon, such as Boot2Docker, |
|
| 57 |
-> then _do not_ type the `sudo` before the `docker` commands shown in the |
|
| 58 |
-> documentation's examples. |
|
| 131 |
+ When it completes, the installer provides you with some information you can |
|
| 132 |
+ use to complete some common tasks. |
|
| 133 |
+ |
|
| 134 |
+  |
|
| 135 |
+ |
|
| 136 |
+7. Press "Close" to exit. |
|
| 59 | 137 |
|
| 60 |
-**Boot2Docker Start** will automatically start a shell with environment variables |
|
| 61 |
-correctly set so you can start using Docker right away: |
|
| 62 | 138 |
|
| 63 |
-Let's try the `hello-world` example image. Run |
|
| 139 |
+## Running a Docker Container |
|
| 64 | 140 |
|
| 65 |
- $ docker run hello-world |
|
| 141 |
+To run a Docker container, you: |
|
| 142 |
+ |
|
| 143 |
+* create a new (or start an existing) Docker virtual machine |
|
| 144 |
+* switch your environment to your new VM |
|
| 145 |
+* use the `docker` client to create, load, and manage containers |
|
| 146 |
+ |
|
| 147 |
+Once you create a machine, you can reuse it as often as you like. Like any |
|
| 148 |
+VirtualBox VM, it maintains its configuration between uses. |
|
| 149 |
+ |
|
| 150 |
+There are several ways to use the installed tools, from the Docker Quickstart Terminal or |
|
| 151 |
+[from your shell](#from-your-shell). |
|
| 152 |
+ |
|
| 153 |
+### From the Docker Quickstart Terminal |
|
| 154 |
+ |
|
| 155 |
+1. Find the Docker Quickstart Terminal icon on your Desktop and double-click to launch it. |
|
| 156 |
+ |
|
| 157 |
+ The application: |
|
| 158 |
+ |
|
| 159 |
+ * opens a terminal window |
|
| 160 |
+ * creates a `docker-vm` if it doesn't exist, starts the VM if it does |
|
| 161 |
+ * points the terminal environment to this VM |
|
| 162 |
+ |
|
| 163 |
+ Once the launch completes, you can run `docker` commands. |
|
| 164 |
+ |
|
| 165 |
+3. Verify your setup succeeded by running the `hello-world` container. |
|
| 166 |
+ |
|
| 167 |
+ $ docker run hello-world |
|
| 168 |
+ Unable to find image 'hello-world:latest' locally |
|
| 169 |
+ 511136ea3c5a: Pull complete |
|
| 170 |
+ 31cbccb51277: Pull complete |
|
| 171 |
+ e45a5af57b00: Pull complete |
|
| 172 |
+ hello-world:latest: The image you are pulling has been verified. |
|
| 173 |
+ Important: image verification is a tech preview feature and should not be |
|
| 174 |
+ relied on to provide security. |
|
| 175 |
+ Status: Downloaded newer image for hello-world:latest |
|
| 176 |
+ Hello from Docker. |
|
| 177 |
+ This message shows that your installation appears to be working correctly. |
|
| 178 |
+ |
|
| 179 |
+ To generate this message, Docker took the following steps: |
|
| 180 |
+ 1. The Docker client contacted the Docker daemon. |
|
| 181 |
+ 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. |
|
| 182 |
+ (Assuming it was not already locally available.) |
|
| 183 |
+ 3. The Docker daemon created a new container from that image which runs the |
|
| 184 |
+ executable that produces the output you are currently reading. |
|
| 185 |
+ 4. The Docker daemon streamed that output to the Docker client, which sent it |
|
| 186 |
+ to your terminal. |
|
| 187 |
+ |
|
| 188 |
+ To try something more ambitious, you can run an Ubuntu container with: |
|
| 189 |
+ $ docker run -it ubuntu bash |
|
| 190 |
+ |
|
| 191 |
+ For more examples and ideas, visit: |
|
| 192 |
+ http://docs.docker.com/userguide/ |
|
| 66 | 193 |
|
| 67 |
-This should download the very small `hello-world` image and print a |
|
| 68 |
-`Hello from Docker.` message. |
|
| 69 | 194 |
|
| 70 | 195 |
## Using Docker from Windows Command Line Prompt (cmd.exe) |
| 71 | 196 |
|
| 72 |
-Launch a Windows Command Line Prompt (cmd.exe). |
|
| 197 |
+1. Launch a Windows Command Line Prompt (cmd.exe). |
|
| 198 |
+ |
|
| 199 |
+ The `docker-machine` command requires `ssh.exe` in your `PATH` environment |
|
| 200 |
+ variable. This `.exe` is in the MsysGit `bin` folder. |
|
| 201 |
+ |
|
| 202 |
+2. Add this to the `%PATH%` environment variable by running: |
|
| 203 |
+ |
|
| 204 |
+ set PATH=%PATH%;"c:\Program Files (x86)\Git\bin" |
|
| 205 |
+ |
|
| 206 |
+3. Create a new Docker VM. |
|
| 207 |
+ |
|
| 208 |
+ docker-machine create --driver virtualbox my-docker-vm |
|
| 209 |
+ Creating VirtualBox VM... |
|
| 210 |
+ Creating SSH key... |
|
| 211 |
+ Starting VirtualBox VM... |
|
| 212 |
+ Starting VM... |
|
| 213 |
+ To see how to connect Docker to this machine, run: docker-machine env my-docker-vm |
|
| 214 |
+ |
|
| 215 |
+ The command also creates a machine configuration in the |
|
| 216 |
+ `C:\USERS\USERNAME\.docker\machine\machines` directory. You only need to run the `create` |
|
| 217 |
+ command once. Then, you can use `docker-machine` to start, stop, query, and |
|
| 218 |
+ otherwise manage the VM from the command line. |
|
| 219 |
+ |
|
| 220 |
+4. List your available machines. |
|
| 73 | 221 |
|
| 74 |
-Boot2Docker command requires `ssh.exe` to be in the PATH, therefore we need to |
|
| 75 |
-include `bin` folder of the Git installation (which has ssh.exe) to the `%PATH%` |
|
| 76 |
-environment variable by running: |
|
| 222 |
+ C:\Users\mary> docker-machine ls |
|
| 223 |
+ NAME ACTIVE DRIVER STATE URL SWARM |
|
| 224 |
+ my-docker-vm * virtualbox Running tcp://192.168.99.101:2376 |
|
| 225 |
+ |
|
| 226 |
+ If you have previously installed the deprecated Boot2Docker application or |
|
| 227 |
+ run the Docker Quickstart Terminal, you may have a `dev` VM as well. |
|
| 77 | 228 |
|
| 78 |
- set PATH=%PATH%;"c:\Program Files (x86)\Git\bin" |
|
| 229 |
+5. Get the environment commands for your new VM. |
|
| 79 | 230 |
|
| 80 |
-and then we can run the `boot2docker start` command to start the Boot2Docker VM. |
|
| 81 |
-(Run `boot2docker init` command if you get an error saying machine does not |
|
| 82 |
-exist.) Then copy the instructions for cmd.exe to set the environment variables |
|
| 83 |
-to your console window and you are ready to run docker commands such as |
|
| 84 |
-`docker ps`: |
|
| 231 |
+ C:\Users\mary> docker-machine env --shell cmd my-docker-vm |
|
| 232 |
+ |
|
| 233 |
+6. Connect your shell to the `my-docker-vm` machine. |
|
| 85 | 234 |
|
| 86 |
- |
|
| 235 |
+ C:\Users\mary> eval "$(docker-machine env my-docker-vm)" |
|
| 236 |
+ |
|
| 237 |
+7. Run the `hello-world` container to verify your setup. |
|
| 238 |
+ |
|
| 239 |
+ C:\Users\mary> docker run hello-world |
|
| 87 | 240 |
|
| 88 | 241 |
## Using Docker from PowerShell |
| 89 | 242 |
|
| 90 |
-Launch a PowerShell window, then add `ssh.exe` to your PATH: |
|
| 243 |
+1. Launch a Windows PowerShell window. |
|
| 244 |
+ |
|
| 245 |
+2. Add `ssh.exe` to your PATH: |
|
| 246 |
+ |
|
| 247 |
+ PS C:\Users\mary> $Env:Path = "${Env:Path};c:\Program Files (x86)\Git\bin"
|
|
| 248 |
+ |
|
| 249 |
+3. Create a new Docker VM. |
|
| 250 |
+ |
|
| 251 |
+ PS C:\Users\mary> docker-machine create --driver virtualbox my-docker-vm |
|
| 252 |
+ |
|
| 253 |
+4. List your available machines. |
|
| 254 |
+ |
|
| 255 |
+ C:\Users\mary> docker-machine ls |
|
| 256 |
+ NAME ACTIVE DRIVER STATE URL SWARM |
|
| 257 |
+ my-docker-vm * virtualbox Running tcp://192.168.99.101:2376 |
|
| 258 |
+ |
|
| 259 |
+5. Get the environment commands for your new VM. |
|
| 91 | 260 |
|
| 92 |
- $Env:Path = "${Env:Path};c:\Program Files (x86)\Git\bin"
|
|
| 261 |
+ C:\Users\mary> docker-machine env --shell powershell my-docker-vm |
|
| 262 |
+ |
|
| 263 |
+6. Connect your shell to the `my-docker-vm` machine. |
|
| 93 | 264 |
|
| 94 |
-and after running the `boot2docker start` command it will print PowerShell |
|
| 95 |
-commands to set the environment variables to connect to the Docker daemon |
|
| 96 |
-running inside the VM. Run these commands and you are ready to run docker |
|
| 97 |
-commands such as `docker ps`: |
|
| 265 |
+ C:\Users\mary> eval "$(docker-machine env my-docker-vm)" |
|
| 98 | 266 |
|
| 99 |
- |
|
| 267 |
+7. Run the `hello-world` container to verify your setup. |
|
| 100 | 268 |
|
| 101 |
-> NOTE: You can alternatively run `boot2docker shellinit | Invoke-Expression` |
|
| 102 |
-> command to set the environment variables instead of copying and pasting on |
|
| 103 |
-> PowerShell. |
|
| 269 |
+ C:\Users\mary> docker run hello-world |
|
| 104 | 270 |
|
| 105 |
-# Further Details |
|
| 106 | 271 |
|
| 107 |
-The Boot2Docker management tool provides several commands: |
|
| 272 |
+## Learn about your Toolbox installation |
|
| 108 | 273 |
|
| 109 |
- $ boot2docker |
|
| 110 |
- Usage: boot2docker.exe [<options>] {help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|ip|shellinit|delete|download|upgrade|version} [<args>]
|
|
| 274 |
+Toolbox installs the Docker Engine binary in the `C:\Program Files\Docker |
|
| 275 |
+Toolbox` directory. When you use the Docker Quickstart Terminal or create a |
|
| 276 |
+`docker-vm` manually, Docker Machine updates the |
|
| 277 |
+`C:\USERS\USERNAME\.docker\machine\machines\docker-vm` folder to your |
|
| 278 |
+system. This folder contains the configuration for the VM. |
|
| 111 | 279 |
|
| 112 |
-## Upgrading |
|
| 280 |
+You can create multiple VMs on your system with Docker Machine. So, you may have |
|
| 281 |
+more than one VM folder if you have more than one VM. To remove a VM, use the |
|
| 282 |
+`docker-machine rm <machine-name>` command. |
|
| 283 |
+ |
|
| 284 |
+The `docker-machine` subcommands are slightly different than the `boot2docker` |
|
| 285 |
+subcommands. The table below lists the equivalent `docker-machine` subcommand |
|
| 286 |
+and what it does: |
|
| 113 | 287 |
|
| 114 |
-1. Download the latest release of the [Docker for Windows Installer]( |
|
| 115 |
- https://github.com/boot2docker/windows-installer/releases/latest) |
|
| 288 |
+| `boot2docker` | `docker-machine` | `docker-machine` description | |
|
| 289 |
+|----------------|------------------|----------------------------------------------------------| |
|
| 290 |
+| init | create | Creates a new docker host. | |
|
| 291 |
+| up | start | Starts a stopped machine. | |
|
| 292 |
+| ssh | ssh | Runs a command or interactive ssh session on the machine.| |
|
| 293 |
+| save | - | Not applicable. | |
|
| 294 |
+| down | stop | Stops a running machine. | |
|
| 295 |
+| poweroff | stop | Stops a running machine. | |
|
| 296 |
+| reset | restart | Restarts a running machine. | |
|
| 297 |
+| config | inspect | Prints machine configuration details. | |
|
| 298 |
+| status | ls | Lists all machines and their status. | |
|
| 299 |
+| info | inspect | Displays a machine's details. | |
|
| 300 |
+| ip | ip | Displays the machine's ip address. | |
|
| 301 |
+| shellinit | env | Displays shell commands needed to configure your shell to interact with a machine | |
|
| 302 |
+| delete | rm | Removes a machine. | |
|
| 303 |
+| download | - | Not applicable. | |
|
| 304 |
+| upgrade | upgrade | Upgrades a machine's Docker client to the latest stable release. | |
|
| 116 | 305 |
|
| 117 |
-2. Run the installer, which will update the Boot2Docker management tool. |
|
| 118 | 306 |
|
| 119 |
-3. To upgrade your existing virtual machine, open a terminal and run: |
|
| 307 |
+## Upgrade Docker Toolbox |
|
| 120 | 308 |
|
| 121 |
- boot2docker stop |
|
| 122 |
- boot2docker download |
|
| 123 |
- boot2docker start |
|
| 309 |
+To upgrade Docker Toolbox, download an re-run [the Docker Toolbox |
|
| 310 |
+installer](https://www.docker.com/toolbox). |
|
| 124 | 311 |
|
| 125 | 312 |
## Container port redirection |
| 126 | 313 |
|
| 127 |
-If you are curious, the username for the boot2docker default user is `docker` |
|
| 314 |
+If you are curious, the username for the Docker default user is `docker` |
|
| 128 | 315 |
and the password is `tcuser`. |
| 129 | 316 |
|
| 130 | 317 |
The latest version of `boot2docker` sets up a host only network adaptor which |
| ... | ... |
@@ -161,13 +348,12 @@ You can do this with |
| 161 | 161 |
|
| 162 | 162 |
## Uninstallation |
| 163 | 163 |
|
| 164 |
-You can uninstall Boot2Docker using Window's standard process for removing programs. |
|
| 165 |
-This process does not remove the `docker-install.exe` file. You must delete that file |
|
| 166 |
-yourself. |
|
| 164 |
+You can uninstall Docker Toolbox using Window's standard process for removing |
|
| 165 |
+programs. This process does not remove the `docker-install.exe` file. You must |
|
| 166 |
+delete that file yourself. |
|
| 167 | 167 |
|
| 168 |
-## References |
|
| 168 |
+## Learn more |
|
| 169 | 169 |
|
| 170 |
-If you have Docker hosts running and if you don't wish to do a |
|
| 171 |
-Boot2Docker installation, you can install the docker.exe using |
|
| 172 |
-unofficial Windows package manager Chocolately. For information |
|
| 173 |
-on how to do this, see [Docker package on Chocolatey](http://chocolatey.org/packages/docker). |
|
| 170 |
+You can continue with the [Docker User Guide](/userguide). If you are |
|
| 171 |
+interested in using the Kitematic GUI, see the [Kitermatic user |
|
| 172 |
+guide](/kitematic/userguide/). |