Connecting to a Docker Host

Next, we want to start a separate command prompt to connect to our local Docker host. To do that, you need to set the URL of the host, turn on TLS if you are using authentication, and ensure you are pointing to the right location for your Docker certificates as shown in the environment variables below. For VirtualBox, as you can see in the screenshot in Figure 4.3, it is using the default machine for certs and is at the IP: 192.168.99.100.

Set Windows Environment Variables

Set DOCKER_CERT_PATH=C:\Users\danielfe\.docker\machine\machines\ default Set DOCKER_TLS_VERIFY=1 Set DOCKER_HOST=tcp://192.168.99.100:2376

Set OSX Environment Variables

export DOCKER_CERT_PATH=~/.docker/machine/machines/default ...

Get Microservices with Docker on Microsoft Azure™ (includes Content Update Program) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.