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:Usersdanielfe.dockermachinemachines
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
export DOCKER_TLS_VERIFY=1
export DOCKER_HOST=tcp://192.168.99.100:2376

The Product Catalog Microservice

If you remember from the previous chapter, the product catalog microservice is a simple ASP.NET Core 1.0 microservice that exposes a REST API to search and filter a list of products stored in an Elasticsearch backend.

Elasticsearch is a highly scalable engine that enables you to easily search and filter data. Elasticsearch is available as an official Docker image named “elasticsearch.” For the ASP.NET microservice, we’ll use the Nest client library to connect and query Elasticsearch.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.54.168