Skip to content

Commit

Permalink
[DOCS] Change Docker quick start to bind to localhost (#119026) (#119055
Browse files Browse the repository at this point in the history
)

The current Docker run instructions can expose Kibana and Elasticsearch
publicly to the internet. This updates the instructions to bind to
localhost to avoid this.

Relates to elastic/elasticsearch#80812
  • Loading branch information
jrodewig committed Nov 18, 2021
1 parent 5fd4c77 commit 9229ba2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/setup/docker.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To start an {es} container for development or testing, run:
----
docker network create elastic
docker pull {es-docker-image}
docker run --name es01-test --net elastic -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" {es-docker-image}
docker run --name es01-test --net elastic -p 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9300 -e "discovery.type=single-node" {es-docker-image}
----

To start {kib} and connect it to your {es} container, run the following commands
Expand All @@ -41,7 +41,7 @@ in a new terminal session:
[source,sh,subs="attributes"]
----
docker pull {docker-image}
docker run --name kib01-test --net elastic -p 5601:5601 -e "ELASTICSEARCH_HOSTS=http://es01-test:9200" {docker-image}
docker run --name kib01-test --net elastic -p 127.0.0.1:5601:5601 -e "ELASTICSEARCH_HOSTS=http://es01-test:9200" {docker-image}
----

To access {kib}, go to http://localhost:5601[http://localhost:5601].
Expand Down

0 comments on commit 9229ba2

Please sign in to comment.