mirror of https://github.com/docker/docs.git
Update docker-toolbox.md
This commit is contained in:
parent
9410403796
commit
af3a5a96d5
|
@ -1,13 +1,13 @@
|
||||||
---
|
---
|
||||||
description: Docker for Mac and Docker Toolbox
|
description: Docker Desktop for Mac and Docker Toolbox
|
||||||
keywords: mac, windows, alpha, beta, toolbox, docker-machine, tutorial
|
keywords: mac, windows, alpha, beta, toolbox, docker-machine, tutorial
|
||||||
redirect_from:
|
redirect_from:
|
||||||
- /mackit/docker-toolbox/
|
- /mackit/docker-toolbox/
|
||||||
title: Docker for Mac vs. Docker Toolbox
|
title: Docker Desktop for Mac vs. Docker Toolbox
|
||||||
---
|
---
|
||||||
|
|
||||||
If you already have an installation of Docker Toolbox, read these topics
|
If you already have an installation of Docker Toolbox, read these topics
|
||||||
first to learn how Docker for Mac and Docker Toolbox differ, and how they can
|
first to learn how Docker Desktop for Mac and Docker Toolbox differ, and how they can
|
||||||
coexist.
|
coexist.
|
||||||
|
|
||||||
## The Docker Toolbox environment
|
## The Docker Toolbox environment
|
||||||
|
@ -29,24 +29,24 @@ This setup is shown in the following diagram.
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
## The Docker for Mac environment
|
## The Docker Desktop for Mac environment
|
||||||
|
|
||||||
Docker for Mac is a Mac native application, that you install in `/Applications`.
|
Docker Desktop for Mac is a Mac native application, that you install in `/Applications`.
|
||||||
At installation time, it creates symlinks in `/usr/local/bin` for `docker` and
|
At installation time, it creates symlinks in `/usr/local/bin` for `docker` and
|
||||||
`docker-compose` and others, to the commands in the application
|
`docker-compose` and others, to the commands in the application
|
||||||
bundle, in `/Applications/Docker.app/Contents/Resources/bin`.
|
bundle, in `/Applications/Docker.app/Contents/Resources/bin`.
|
||||||
|
|
||||||
Here are some key points to know about Docker for Mac before you get started:
|
Here are some key points to know about Docker Desktop for Mac before you get started:
|
||||||
|
|
||||||
* Docker for Mac uses
|
* Docker Desktop for Mac uses
|
||||||
[HyperKit](https://github.com/docker/HyperKit/) instead of Virtual Box.
|
[HyperKit](https://github.com/docker/HyperKit/) instead of Virtual Box.
|
||||||
Hyperkit is a lightweight macOS virtualization solution built on top of
|
Hyperkit is a lightweight macOS virtualization solution built on top of
|
||||||
Hypervisor.framework in macOS 10.10 Yosemite and higher.
|
Hypervisor.framework in macOS 10.10 Yosemite and higher.
|
||||||
|
|
||||||
* When you install Docker for Mac, machines created with Docker Machine are
|
* When you install Docker Desktop for Mac, machines created with Docker Machine are
|
||||||
not affected.
|
not affected.
|
||||||
|
|
||||||
* Docker for Mac does not use `docker-machine` to provision its VM.
|
* Docker Desktop for Mac does not use `docker-machine` to provision its VM.
|
||||||
The Docker Engine API is exposed on a
|
The Docker Engine API is exposed on a
|
||||||
socket available to the Mac host at `/var/run/docker.sock`. This is the
|
socket available to the Mac host at `/var/run/docker.sock`. This is the
|
||||||
default location Docker and Docker Compose clients use to connect to
|
default location Docker and Docker Compose clients use to connect to
|
||||||
|
@ -56,22 +56,22 @@ Here are some key points to know about Docker for Mac before you get started:
|
||||||
|
|
||||||
This setup is shown in the following diagram.
|
This setup is shown in the following diagram.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
With Docker for Mac, you only get (and only usually need) one VM, managed by Docker
|
With Docker Desktop for Mac, you only get (and only usually need) one VM, managed by Docker
|
||||||
for Mac. Docker for Mac automatically upgrades the Docker client and
|
for Mac. Docker Desktop for Mac automatically upgrades the Docker client and
|
||||||
daemon when updates are available.
|
daemon when updates are available.
|
||||||
|
|
||||||
Also note that Docker for Mac can’t route traffic to containers, so you can't
|
Also note that Docker Desktop for Mac can’t route traffic to containers, so you can't
|
||||||
directly access an exposed port on a running container from the hosting machine.
|
directly access an exposed port on a running container from the hosting machine.
|
||||||
|
|
||||||
If you do need multiple VMs, such as when testing multi-node swarms, you can
|
If you do need multiple VMs, such as when testing multi-node swarms, you can
|
||||||
continue to use Docker Machine, which operates outside the scope of Docker for
|
continue to use Docker Machine, which operates outside the scope of Docker Desktop for
|
||||||
Mac. See [Docker Toolbox and Docker for Mac
|
Mac. See [Docker Toolbox and Docker Desktop for Mac
|
||||||
coexistence](docker-toolbox.md#docker-toolbox-and-docker-for-mac-coexistence).
|
coexistence](docker-toolbox.md#docker-toolbox-and-docker-for-mac-coexistence).
|
||||||
|
|
||||||
|
|
||||||
## Setting up to run Docker for Mac
|
## Setting up to run Docker Desktop for Mac
|
||||||
|
|
||||||
1. Check whether Toolbox DOCKER environment variables are set:
|
1. Check whether Toolbox DOCKER environment variables are set:
|
||||||
|
|
||||||
|
@ -81,11 +81,11 @@ coexistence](docker-toolbox.md#docker-toolbox-and-docker-for-mac-coexistence).
|
||||||
DOCKER_TLS_VERIFY=1
|
DOCKER_TLS_VERIFY=1
|
||||||
DOCKER_CERT_PATH=/Users/<your_username>/.docker/machine/machines/default
|
DOCKER_CERT_PATH=/Users/<your_username>/.docker/machine/machines/default
|
||||||
|
|
||||||
If this command returns no output, you are ready to use Docker for Mac.
|
If this command returns no output, you are ready to use Docker Desktop for Mac.
|
||||||
|
|
||||||
If it returns output (as shown in the example), unset
|
If it returns output (as shown in the example), unset
|
||||||
the `DOCKER` environment variables to make the client talk to the
|
the `DOCKER` environment variables to make the client talk to the
|
||||||
Docker for Mac Engine (next step).
|
Docker Desktop for Mac Engine (next step).
|
||||||
|
|
||||||
2. Run the `unset` command on the following `DOCKER` environment variables to
|
2. Run the `unset` command on the following `DOCKER` environment variables to
|
||||||
unset them in the current shell.
|
unset them in the current shell.
|
||||||
|
@ -105,11 +105,11 @@ coexistence](docker-toolbox.md#docker-toolbox-and-docker-for-mac-coexistence).
|
||||||
|
|
||||||
> **Note**: If you have a shell script as part of your profile that sets these
|
> **Note**: If you have a shell script as part of your profile that sets these
|
||||||
> `DOCKER` environment variables automatically each time you open a command
|
> `DOCKER` environment variables automatically each time you open a command
|
||||||
> window, then you need to unset these each time you want to use Docker for Mac.
|
> window, then you need to unset these each time you want to use Docker Desktop for Mac.
|
||||||
|
|
||||||
> If you install Docker for Mac on a machine where Docker Toolbox is installed..
|
> If you install Docker Desktop for Mac on a machine where Docker Toolbox is installed..
|
||||||
>
|
>
|
||||||
> Docker for Mac replaces the `docker` and `docker-compose` command lines in
|
> Docker Desktop for Mac replaces the `docker` and `docker-compose` command lines in
|
||||||
> `/usr/local/bin` with symlinks to its own versions.
|
> `/usr/local/bin` with symlinks to its own versions.
|
||||||
{:.warning}
|
{:.warning}
|
||||||
|
|
||||||
|
@ -117,10 +117,10 @@ See also [Unset environment variables in the current
|
||||||
shell](/machine/get-started.md#unset-environment-variables-in-the-current-shell)
|
shell](/machine/get-started.md#unset-environment-variables-in-the-current-shell)
|
||||||
in the Docker Machine topics.
|
in the Docker Machine topics.
|
||||||
|
|
||||||
## Docker Toolbox and Docker for Mac coexistence
|
## Docker Toolbox and Docker Desktop for Mac coexistence
|
||||||
|
|
||||||
You can use Docker for Mac and Docker Toolbox together on the same machine. When
|
You can use Docker Desktop for Mac and Docker Toolbox together on the same machine. When
|
||||||
you want to use Docker for Mac, make sure all DOCKER environment variables are
|
you want to use Docker Desktop for Mac, make sure all DOCKER environment variables are
|
||||||
unset. You can do this in bash with `unset ${!DOCKER_*}`. When you want to use
|
unset. You can do this in bash with `unset ${!DOCKER_*}`. When you want to use
|
||||||
one of the VirtualBox VMs you have set with `docker-machine`, just run a `eval
|
one of the VirtualBox VMs you have set with `docker-machine`, just run a `eval
|
||||||
$(docker-machine env default)` (or the name of the machine you want to target).
|
$(docker-machine env default)` (or the name of the machine you want to target).
|
||||||
|
@ -129,13 +129,13 @@ machine.
|
||||||
|
|
||||||
This setup is represented in the following diagram.
|
This setup is represented in the following diagram.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
## Using different versions of Docker tools
|
## Using different versions of Docker tools
|
||||||
|
|
||||||
The coexistence setup works as is as long as your VirtualBox VMs provisioned
|
The coexistence setup works as is as long as your VirtualBox VMs provisioned
|
||||||
with `docker-machine` run the same version of Docker Engine as Docker for Mac.
|
with `docker-machine` run the same version of Docker Engine as Docker Desktop for Mac.
|
||||||
If you need to use VMs running older versions of Docker Engine, you can use a
|
If you need to use VMs running older versions of Docker Engine, you can use a
|
||||||
tool like [Docker Version Manager](https://github.com/getcarina/dvm) to manage
|
tool like [Docker Version Manager](https://github.com/getcarina/dvm) to manage
|
||||||
several versions of docker client.
|
several versions of docker client.
|
||||||
|
@ -149,9 +149,9 @@ created with Docker Machine can cause problems (client can't talk to the server
|
||||||
or host machines).
|
or host machines).
|
||||||
|
|
||||||
If you already have [Docker Toolbox](/toolbox/overview/) installed, and then
|
If you already have [Docker Toolbox](/toolbox/overview/) installed, and then
|
||||||
install Docker for Mac, you might get a newer version of the Docker client. Run
|
install Docker Desktop for Mac, you might get a newer version of the Docker client. Run
|
||||||
`docker version` in a command shell to see client and server versions. In this
|
`docker version` in a command shell to see client and server versions. In this
|
||||||
example, the client installed with Docker for Mac is `Version: 1.11.1` and the
|
example, the client installed with Docker Desktop for Mac is `Version: 1.11.1` and the
|
||||||
server (which was installed earlier with Toolbox) is Version: 1.11.0.
|
server (which was installed earlier with Toolbox) is Version: 1.11.0.
|
||||||
|
|
||||||
$ docker version
|
$ docker version
|
||||||
|
@ -164,7 +164,7 @@ server (which was installed earlier with Toolbox) is Version: 1.11.0.
|
||||||
...
|
...
|
||||||
|
|
||||||
Also, if you created machines with Docker Machine (installed with Toolbox) then
|
Also, if you created machines with Docker Machine (installed with Toolbox) then
|
||||||
upgraded or installed Docker for Mac, you might have machines running different
|
upgraded or installed Docker Desktop for Mac, you might have machines running different
|
||||||
versions of Engine. Run `docker-machine ls` to view version information for the
|
versions of Engine. Run `docker-machine ls` to view version information for the
|
||||||
machines you created. In this example, the DOCKER column shows that each machine
|
machines you created. In this example, the DOCKER column shows that each machine
|
||||||
is running a different version of server.
|
is running a different version of server.
|
||||||
|
@ -181,9 +181,9 @@ There are a few ways to address this problem and keep using your older
|
||||||
machines. One solution is to use a version manager like
|
machines. One solution is to use a version manager like
|
||||||
[DVM](https://github.com/getcarina/dvm).
|
[DVM](https://github.com/getcarina/dvm).
|
||||||
|
|
||||||
## Migrating from Docker Toolbox to Docker for Mac
|
## Migrating from Docker Toolbox to Docker Desktop for Mac
|
||||||
|
|
||||||
Docker for Mac does not propose Toolbox image migration as part of its
|
Docker Desktop for Mac does not propose Toolbox image migration as part of its
|
||||||
installer since version 18.01.0. You can migrate existing Docker
|
installer since version 18.01.0. You can migrate existing Docker
|
||||||
Toolbox images with the scripts described below. (This migration
|
Toolbox images with the scripts described below. (This migration
|
||||||
cannot merge images from both Docker and Toolbox: any existing Docker image is
|
cannot merge images from both Docker and Toolbox: any existing Docker image is
|
||||||
|
@ -235,7 +235,7 @@ it](https://docs.docker.com/toolbox/toolbox_install_mac/#how-to-uninstall-toolbo
|
||||||
|
|
||||||
## How do I uninstall Docker Toolbox?
|
## How do I uninstall Docker Toolbox?
|
||||||
|
|
||||||
You might decide that you do not need Toolbox now that you have Docker for Mac,
|
You might decide that you do not need Toolbox now that you have Docker Desktop for Mac,
|
||||||
and want to uninstall it. For details on how to perform a clean uninstall of
|
and want to uninstall it. For details on how to perform a clean uninstall of
|
||||||
Toolbox on the Mac, see [How to uninstall
|
Toolbox on the Mac, see [How to uninstall
|
||||||
Toolbox](/toolbox/toolbox_install_mac.md#how-to-uninstall-toolbox) in the
|
Toolbox](/toolbox/toolbox_install_mac.md#how-to-uninstall-toolbox) in the
|
||||||
|
|
Loading…
Reference in New Issue