Creating and running an Elasticsearch container
While we are looking at pulling container images and starting containers, let's go and run an Elasticsearch container.
How to do it
Like most things Docker, there are a lot of different versions of Elasticsearch containers available. We will use the official Elasticsearch image available in Elastic's own Docker repository:
- To install the image, enter the following:
$docker pull docker.elastic.co/elasticsearch/elasticsearch:6.1.1
Note
Note that we are using another way of specifying the image to pull. Since this is on Elastic's Docker repository, we include the qualified name that includes the URL to the container image instead of just the image name. The :6.1.1 is the tag and specifies a specific version of that image.
- You will see some output while this is processing, showing the download process. When it is complete, you will have a few lines letting you know it is done:
Digest: sha256:9e6c7d3c370a17736c67b2ac503751702e35a1336724741d00ed9b3d00434fcb...