cleanup toolbox migration page, and remove old "for-mac" page

The docker for mac "toolbox" migration page was not accessible as it
was redirected, so removing that page and related images.

This page contained instructions to backup images, which was described
elsewhere, so removing that part in favor of a link to the (better maintained)
content in the "desktop" section.

Also move the migration page that was located inside the "for windows"
directory to a "toolbox" directory, which matches the location inside the
TOC.

Finally; remove the "troubleshooting" entry from the TOC, as it was
redirecting to the migration page (and was under the "kitematic" section,
which was confusing).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2021-05-11 09:55:14 +02:00
parent daef249703
commit 4757145e94
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
8 changed files with 27 additions and 281 deletions

View File

@ -1576,7 +1576,7 @@ manuals:
title: VMware vSphere
- path: /machine/migrate-to-machine/
title: Migrate from Boot2Docker to Machine
- path: /docker-for-windows/docker-toolbox/
- path: /toolbox/
title: Docker Toolbox (deprecated)
- sectiontitle: Kitematic
section:
@ -1592,6 +1592,3 @@ manuals:
title: Frequently asked questions
- path: /kitematic/known-issues/
title: Known issues
- path: /toolbox/faqs/troubleshoot/
title: Troubleshooting
nosync: true

View File

@ -1,205 +0,0 @@
---
description: Docker Desktop on Mac and Docker Toolbox
keywords: mac, windows, alpha, beta, toolbox, docker-machine, tutorial
redirect_from:
- /mackit/docker-toolbox/
title: Docker Desktop on Mac vs. Docker Toolbox
---
If you already have an installation of Docker Toolbox, read these topics
first to learn how Docker Desktop on Mac and Docker Toolbox differ, and how they can
coexist.
## The Docker Toolbox environment
Docker Toolbox installs `docker`, `docker-compose`, and `docker-machine` in
`/usr/local/bin` on your Mac. It also installs VirtualBox. At installation time,
Toolbox uses `docker-machine` to provision a VirtualBox VM called `default`,
running the `boot2docker` Linux distribution, with [Docker Engine](/engine/)
with certificates located on your Mac at
`$HOME/.docker/machine/machines/default`.
Before you use `docker` or `docker-compose` on your Mac, you typically use the
command `eval $(docker-machine env default)` to set environment variables so
that `docker` or `docker-compose` know how to talk to Docker Engine running on
VirtualBox.
This setup is shown in the following diagram.
![Docker Toolbox Install](images/toolbox-install.png)
## The Docker Desktop on Mac environment
Docker Desktop on Mac is a Mac-native application, that you install in `/Applications`.
At installation time, it creates symlinks in `/usr/local/bin` for `docker` and
`docker-compose` and others, to the commands in the application
bundle, in `/Applications/Docker.app/Contents/Resources/bin`.
Here are some key points to know about Docker Desktop on Mac before you get started:
* Docker Desktop uses [HyperKit](https://github.com/docker/HyperKit/) instead of Virtual Box. Hyperkit is a lightweight macOS virtualization solution built on top of Hypervisor.framework in macOS 10.10 Yosemite and higher.
* When you install Docker Desktop on Mac, machines created with Docker Machine are not affected.
* Docker Desktop does not use `docker-machine` to provision its VM.
The Docker Engine API is exposed on a
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
the Docker daemon, so you can use `docker` and `docker-compose` CLI commands
on your Mac.
This setup is shown in the following diagram.
![Docker Desktop for Mac Install](images/docker-for-mac-install.png)
With Docker Desktop on Mac, you only get (and only usually need) one VM, managed by Docker Desktop. Docker Desktop automatically upgrades the Docker client and daemon when updates are available.
Also note that Docker Desktop cant route traffic to containers, so you can't
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
continue to use Docker Machine, which operates outside the scope of Docker Desktop. See
[Docker Toolbox and Docker Desktop coexistence](docker-toolbox.md#docker-toolbox-and-docker-desktop-coexistence).
## Setting up to run Docker Desktop on Mac
1. Check whether Toolbox DOCKER environment variables are set:
$ env | grep DOCKER
DOCKER_HOST=tcp://192.168.99.100:2376
DOCKER_MACHINE_NAME=default
DOCKER_TLS_VERIFY=1
DOCKER_CERT_PATH=/Users/<your_username>/.docker/machine/machines/default
If this command returns no output, you are ready to use Docker Desktop.
If it returns output (as shown in the example), unset
the `DOCKER` environment variables to make the client talk to the
Docker Desktop Engine (next step).
2. Run the `unset` command on the following `DOCKER` environment variables to
unset them in the current shell.
unset DOCKER_TLS_VERIFY
unset DOCKER_CERT_PATH
unset DOCKER_MACHINE_NAME
unset DOCKER_HOST
Now, this command should return no output.
$ env | grep DOCKER
If you are using a Bash shell, you can use `unset ${!DOCKER_*}` to unset all
DOCKER environment variables at once. (This does not work in other shells such
as `zsh`; you need to unset each variable individually.)
> **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
> window, then you need to unset these each time you want to use Docker Desktop.
> If you install Docker Desktop on a machine where Docker Toolbox is installed..
>
> Docker Desktop replaces the `docker` and `docker-compose` command lines in
> `/usr/local/bin` with symlinks to its own versions.
{:.warning}
See also [Unset environment variables in the current shell](../machine/get-started.md#unset-environment-variables-in-the-current-shell)
in the Docker Machine topics.
## Docker Toolbox and Docker Desktop coexistence
You can use Docker Desktop and Docker Toolbox together on the same machine. When
you want to use Docker Desktop make sure all DOCKER environment variables are
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
$(docker-machine env default)` (or the name of the machine you want to target).
This switches the current command shell to talk to the specified Toolbox
machine.
This setup is represented in the following diagram.
![Docker Toolbox and Docker Desktop for Mac coexistence](images/docker-for-mac-and-toolbox.png)
## Using different versions of Docker tools
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 Desktop.
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
several versions of docker client.
### Checking component versions
Ideally, the Docker CLI client and Docker Engine should be the same version.
Mismatches between client and server, and host machines you might have
created with Docker Machine can cause problems (client can't talk to the server
or host machines).
If you have already installed [Docker Toolbox](/toolbox/overview/), and then
installed Docker Desktop, 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 example, the client installed with Docker Desktop is `Version: 19.03.1` and the server (which was installed earlier with Toolbox) is `Version: 19.03.2`.
$ docker version
Client:
Version: 19.03.1
...
Server:
Version: 19.03.2
...
Also, if you created machines with Docker Machine (installed with Toolbox) then
upgraded or installed Docker Desktop, you might have machines running different
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
is running a different version of server.
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
aws-sandbox - amazonec2 Running tcp://52.90.113.128:2376 v19.03.1
default * virtualbox Running tcp://192.168.99.100:2376 v19.03.2
docker-sandbox - digitalocean Running tcp://104.131.43.236:2376 v19.03.1
There are a few ways to address this problem and keep using your older
machines. One solution is to use a version manager like
[DVM](https://github.com/getcarina/dvm).
## Migrating from Docker Toolbox to Docker Desktop on Mac
Docker Desktop does not propose Toolbox image migration as part of its
installer since version 18.01.0. You can migrate existing Docker
Toolbox images with the steps described below.
In a terminal, while running Toolbox, use `docker commit` to create an image snapshot
from a container, for each container you wish to preserve:
```
$ docker commit nginx
sha256:1bc0ee792d144f0f9a1b926b862dc88b0206364b0931be700a313111025df022
```
Next, export each of these images (and any other images you wish to keep):
```
$ docker save -o nginx.tar sha256:1bc0ee792d144f0f9a1b926b862dc88b0206364b0931be700a313111025df022
```
Next, when running Docker Desktop on Mac, reload all these images:
```
$ docker load -i nginx.tar
Loaded image ID: sha256:1bc0ee792d144f0f9a1b926b862dc88b0206364b0931be700a313111025df022
```
Note these steps will not migrate any `docker volume` contents: these must
be copied across manually.
Finally (optional), if you are done with Docker Toolbox, you may fully
[uninstall
it](https://docs.docker.com/toolbox/toolbox_install_mac/#how-to-uninstall-toolbox).
## How do I uninstall Docker Toolbox?
You might decide that you do not need Toolbox now that you have Docker Desktop,
and want to uninstall it. For details on how to perform a clean uninstall of
Toolbox on Mac, see [How to uninstall Toolbox](../toolbox/toolbox_install_mac.md#how-to-uninstall-toolbox)
in the Toolbox Mac topics.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

View File

@ -15,7 +15,6 @@ redirect_from:
- /mackit/getting-started/
- /docker-for-mac/osxfs/
- /docker-for-mac/osxfs-caching/
- /docker-for-mac/docker-toolbox/
title: Docker Desktop for Mac user manual
toc_min: 1
toc_max: 2

View File

@ -920,7 +920,7 @@ Docker Desktop Community 2.1.0.0 contains the following experimental features:
- Fix Linuxkit start on Windows RS4 Insider. Fixes [docker/for-win#1458](https://github.com/docker/for-win/issues/1458), [docker/for-win#1514](https://github.com/docker/for-win/issues/1514), [docker/for-win#1640](https://github.com/docker/for-win/issues/1640)
- Fix risk of privilege escalation. (https://www.tenable.com/sc-report-templates/microsoft-windows-unquoted-service-path-vulnerability)
- All users present in the docker-users group are now able to use Docker. Fixes [docker/for-win#1732](https://github.com/docker/for-win/issues/1732)
- Migration of Docker Toolbox images is not proposed in Docker For Windows installer (still possible to [migrate Toolbox images manually](https://docs.docker.com/docker-for-windows/docker-toolbox/) ).
- Migration of Docker Toolbox images is not proposed in Docker For Windows installer (still possible to [migrate Toolbox images manually](https://docs.docker.com/toolbox/) ).
- Better cleanup for Windows containers and images on reset/uninstall. Fixes [docker/for-win#1580](https://github.com/docker/for-win/issues/1580), [docker/for-win#1544](https://github.com/docker/for-win/issues/1544), [docker/for-win#191](https://github.com/docker/for-win/issues/191)
- Desktop icon creation is optional in installer; do not recreate Desktop icon on upgrade (effective on next upgrade). Fixes [docker/for-win#246](https://github.com/docker/for-win/issues/246), [docker/for-win#925](https://github.com/docker/for-win/issues/925), [docker/for-win#1551](https://github.com/docker/for-win/issues/1551)

View File

@ -4,82 +4,34 @@ keywords: windows, alpha, beta, toolbox, docker-machine, tutorial
sitemap: false
title: Docker Toolbox
redirect_from:
- /toolbox/
- /docker-for-mac/docker-toolbox/
- /docker-for-windows/docker-toolbox/
- /mackit/docker-toolbox/
- /toolbox/faqs/
- /toolbox/faqs/troubleshoot/
- /toolbox/overview/
- /toolbox/toolbox_install_mac/
- /toolbox/toolbox_install_windows/
- /toolbox/faqs/
- /toolbox/faqs/troubleshoot/
- /docker-for-mac/docker-toolbox/
toc_min: 1
toc_max: 2
---
>**Deprecated**
>
> Docker Toolbox has been deprecated and is no longer in active development. Please use Docker Desktop instead. See [Docker Desktop for Mac](../docker-for-mac/index.md) and [Docker Desktop for Windows](../docker-for-windows/index.md).
> Docker Toolbox has been deprecated and is no longer in active development. Please
> use Docker Desktop instead. See [Docker Desktop for Mac](../docker-for-mac/index.md)
> and [Docker Desktop for Windows](../docker-for-windows/index.md).
{: .warning }
This page explains how to migrate your Docker Toolbox disk images to Docker Desktop. It also contains instructions on how to uninstall Docker Toolbox from Mac and Windows machines.
This page explains how to migrate your Docker Toolbox installation to Docker Desktop.
It also contains instructions on how to uninstall Docker Toolbox from Mac and Windows machines.
## Migrate from Docker Toolbox to Docker Desktop on Mac
## Migrate from Docker Toolbox to Docker Desktop
You can migrate existing Docker Toolbox images with the steps described below.
In a terminal, while running Toolbox, use `docker commit` to create an image snapshot
from a container, for each container you wish to preserve:
```
$ docker commit nginx
sha256:1bc0ee792d144f0f9a1b926b862dc88b0206364b0931be700a313111025df022
```
Next, export each of these images (and any other images you wish to keep):
```
$ docker save -o nginx.tar sha256:1bc0ee792d144f0f9a1b926b862dc88b0206364b0931be700a313111025df022
```
Next, when running Docker Desktop on Mac, reload all these images:
```
$ docker load -i nginx.tar
Loaded image ID: sha256:1bc0ee792d144f0f9a1b926b862dc88b0206364b0931be700a313111025df022
```
Note these steps will not migrate any `docker volume` contents: these must
be copied across manually.
Finally (optional), if you are done with Docker Toolbox, you can fully
[uninstall](#uninstall-docker-toolbox-on-windows) Docker Toolbox using the instructions described in the following section.
## Migrate from Docker Toolbox to Docker Desktop on Windows
You can migrate existing Docker Toolbox images with the steps described below.
In a terminal, while running Toolbox, use `docker commit` to create an image snapshot
from a container, for each container you wish to preserve:
```
> docker commit nginx
sha256:1bc0ee792d144f0f9a1b926b862dc88b0206364b0931be700a313111025df022
```
Next, export each of these images (and any other images you wish to keep):
```
> docker save -o nginx.tar sha256:1bc0ee792d144f0f9a1b926b862dc88b0206364b0931be700a313111025df022
```
Next, when running Docker Desktop on Windows, reload all these images:
```
> docker load -i nginx.tar
Loaded image ID: sha256:1bc0ee792d144f0f9a1b926b862dc88b0206364b0931be700a313111025df022
```
Note these steps will not migrate any `docker volume` contents: these must
be copied across manually.
Uninstalling Docker Toolbox will remove your local image cache, volumes, containers,
and other data stored in Docker. Refer to the [back up and restore data](../desktop/backup-and-restore.md)
documentation before uninstalling Docker Toolbox, to learn how to back up your
data.
## Uninstall Docker Toolbox
@ -87,7 +39,10 @@ Removing Toolbox involves removing all the Docker components it includes.
A full uninstall also includes removing the local and remote machines
you created with Docker Machine. In some cases, you might want to keep
machines created with Docker Machine. For example, if you plan to re-install Docker Machine as a part of Docker Desktop, you can continue to manage those machines through Docker. Or, if you have remote machines on a cloud provider and you plan to manage them using the provider, you wouldn't want to remove
machines created with Docker Machine. For example, if you plan to re-install
Docker Machine as a part of Docker Desktop, you can continue to manage those
machines through Docker. Or, if you have remote machines on a cloud provider and
you plan to manage them using the provider, you wouldn't want to remove
them. So, the step to remove machines is described here as optional.
### Uninstall Docker Toolbox on Mac
@ -96,7 +51,7 @@ To uninstall Docker Toolbox on Mac:
1. List your machines.
```
```console
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM
dev * virtualbox Running tcp://192.168.99.100:2376
@ -106,7 +61,7 @@ To uninstall Docker Toolbox on Mac:
2. Optionally, remove each machine. For example:
```
```console
$ docker-machine rm my-docker-machine
Successfully removed my-docker-machine
```
@ -121,7 +76,7 @@ To uninstall Docker Toolbox on Mac:
4. Run the following in a command shell to fully remove Kitematic:
```
```console
$ rm -fr ~/Library/Application\ Support/Kitematic
```
@ -130,7 +85,7 @@ To uninstall Docker Toolbox on Mac:
installed them; in case of doubt leave them, or reinstall them via Brew, or
rerun Docker Desktop for Mac (no need to reinstall it).
```
```console
$ rm -f /usr/local/bin/docker
$ rm -f /usr/local/bin/docker-compose
$ rm -f /usr/local/bin/docker-machine
@ -150,7 +105,7 @@ To uninstall Toolbox on Windows:
1. List your machines.
```
```console
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM
dev * virtualbox Running tcp://192.168.99.100:2376
@ -160,7 +115,7 @@ To uninstall Toolbox on Windows:
2. Optionally, remove each machine. For example:
```
```console
$ docker-machine rm my-docker-machine
Successfully removed my-docker-machine
```