Docker Toolbox and the Devilbox¶
Docker Toolbox is a legacy solution to bring Docker to systems which don’t natively support Docker. This is achieved by starting a virtualized Linux instance (e.g.: inside VirtualBox) and have Docker run inside this machine.
You don’t have to take care about setting up the virtual machine, this is done automatically with the provided setup file (Windows and MacOS).
However, there are a few stumbling blocks you need to pay attention to in order to use the Devilbox at its full potential.
Table of Contents
First thing you need to make sure is that the
LOCAL_LISTEN_ADDR variable from your
file is empty. When it is empty all services bind to all IP addresses inside the virtual machine
and thus being able to be seen from outside the virtual machine (your host operating system).
You can verifiy that the variable is actually empty by checking your
host> grep ^LOCAL_LISTEN_ADDR .env LOCAL_LISTEN_ADDR=
The variable should exist, but there should not be any value after the equal sign.
The Devilbox intranet will not be available under
localhost as it does not run
on your host operating system, but on a virtualized Linux machine which has a different IP address.
To find out the IP address on which Docker Toolbox is running you have to use the
docker-machine command. Open a terminal and type the following:
host> docker-machine ip default 192.168.99.100
The above example outputs
192.168.99.100, but this might be different on your machine.
In this example I would then paste
http://192.168.99.100 in the web browsers address bar to
reach the Devilbox intranet.
When creating manual DNS records per project, you have to keep in mind that you cannot use
127.0.0.1 for the IP address part. You have to use the IP address of the Docker Toolbox
virtual machine as was shown in the above example.
Assuming the Docker Toolbox IP address is:
192.168.99.100, you have to create DNS records as
In order to make Auto-DNS for projects work as it does for native Docker implementations you will have to do some prior configuration.
Auto-DNS is a catch-all DNS resolver for your chosen TLD_SUFFIX that will redirect any
127.0.0.1. Unfortunately Docker Toolbox does not listen on that IP address.
To overcome this problem, you will have to create three port forwards on your host operating system
from the Docker machine IP address for
DNS (port 53),
http (port 80) and
(port 443) to
127.0.0.1 on your host os.
Assuming the Docker Toolbox IP address is
192.168.99.100 the three port forwards must be as
|From IP||From port||To IP||To port|