Docker Toolbox is the legacy way to use Docker on Windows, using VirtualBox, but it’s still useful when :
- you can’t use Docker for Windows because you can’t honor any of these prerequisites :
- you can’t use Hyper-V
- it requires Windows 10 Pro, Enterprise or Education (64 bits)
- you absolutely want to use VirtualBox (see Can I use VirtualBox alongside Docker 4 Windows?).
- there are conflicts with other tools when using Hyper-V. For example there used to be problems with Android Emulator using Intel HAXM until recently (it seems to be resolved now, see there or there). See an example of conflict.
Upgrading the Docker Engine (server side) is easy with docker-machine. Just use :
docker-machine upgrade <machine_name>
and it will try to download the latest release (boot2docker.iso, working on VirtualBox) on https://github.com/boot2docker/boot2docker/releases/latest .
To update Docker Client, you could reinstall Docker Toolbox, but it’s quite cumbersome. In fact you can rebuild docker.exe from sources. After Docker Toolbox installation, this file can normally be found in « C:\Program Files\Docker Toolbox\docker.exe« .
How to build an exe for Windows
I found in Docker Toolbox sources how docker.exe was built and embedded.
It’s partly in this line :
RUN cp /go/src/github.com/docker/cli/build/docker-windows-amd64 docker.exe
Then I found that the CLI tool is in this repo : https://github.com/docker/docker-ce, under components/cli . So we can follow the instructions to build it.
For example, if you want to build docker.exe for a given version, let’s say « 18.05.0-ce », you can follow this script :
Install the new exe
Then you can backup your old docker.exe in « C:\Program Files\Docker Toolbox\docker.exe » and replace it with the new one.
Test the new version
Check that the new version is working :
> docker --version Docker version 18.05.0-ce, build