Working with Docker Toolbox

Some notes taken while working with Docker Toolbox.

Docker Toolbox is mainly seen on Windows 7.

Access container exposed endpoints

Opposite to Windows 10 and Linux distros, Docker Toolbox still uses Docker Machine. So, to access your container, in fact you have to target middleware VM that hosts your containers.

To find out whats the IP of your host VM type

λ  docker-machine ip
192.168.99.100

Then, access your container

λ  curl 192.168.99.100:5555/api/canary

StatusCode        : 200
StatusDescription : OK
Content           : OK
RawContent        : HTTP/1.1 200 OK
                    Transfer-Encoding: chunked
                    Content-Type: text/plain; charset=utf-8
                    Date: Tue, 22 Oct 2019 11:51:03 GMT
                    Server: Kestrel

There is a workaround for that, but haven't tested it yet.
How to access containers by internal IPs 172.x.x.x

comments powered by Disqus