- Login into your sandbox
- Shutdown host services to release memory:
sudo systemctl stop elasticsearch kibana filebeat logstash
- Since previously installed Elastic is configured to use port 9200, we will use a different port: 9201 for the container listener
sudo docker run -d -p 9201:9200 -e "http.host=0.0.0.0" \ -e "transport.host=127.0.0.1" \ docker.elastic.co/elasticsearch/elasticsearch-oss:7.9.1
- -d: run detached not to take over command prompt
- -e: parameters accepted/expected by the image
- Give it a few moments to start and then test:
curl localhost:9201
- Expected output:
{ "name" : "ub7KTFp", "cluster_name" : "docker-cluster", "cluster_uuid" : "qRZeIskgTSOjrgpgAHSNAg", "version" : { "number" : "6.1.1", "build_hash" : "bd92e7f", "build_date" : "2017-12-17T20:23:25.338Z", "build_snapshot" : false, "lucene_version" : "7.1.0", "minimum_wire_compatibility_version" : "5.6.0", "minimum_index_compatibility_version" : "5.0.0" }, "tagline" : "You Know, for Search" }
- Using docker cli to list containers:
sudo docker ps -a
- The expected output is a list with two containers:
hello-world
andelastic
- To stop running container, copy
container id
to replace in the command:sudo docker stop 8ed07e81b59c
- Using docker cli to list containers to confirm none are running:
sudo docker ps -a
- The expected output is a list of two containers previously launched: hello-world and elasticsearch