Skip to content

Commit 5a41bc9

Browse files
smacrakiskolchfa-awsnatebower
authored
Update docker.md (#10869)
* Update docker.md Clearer description of password setting. Sending a request to port 9200 doesn't work immediately. Signed-off-by: Stavros Macrakis <134456002+smacrakis@users.noreply.github.com> * Update _install-and-configure/install-opensearch/docker.md Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Apply suggestions from code review Signed-off-by: Nathan Bower <nbower@amazon.com> --------- Signed-off-by: Stavros Macrakis <134456002+smacrakis@users.noreply.github.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Nathan Bower <nbower@amazon.com> Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Co-authored-by: Nathan Bower <nbower@amazon.com>
1 parent 56149c8 commit 5a41bc9

File tree

1 file changed

+8
-7
lines changed
  • _install-and-configure/install-opensearch

1 file changed

+8
-7
lines changed

_install-and-configure/install-opensearch/docker.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,19 @@ To download a specific version of OpenSearch or OpenSearch Dashboards other than
9595

9696
Before continuing, you should verify that Docker is working correctly by deploying OpenSearch in a single container.
9797

98-
1. Run the following command:
98+
1. Start OpenSearch in Docker.
99+
OpenSearch 2.12 or later requires that you set a custom admin password when starting. For more information, see [Setting a custom admin password](#setting-a-custom-admin-password). If the password is insufficiently strong, an error is reported in the log and OpenSearch quits:
100+
```bash
101+
docker run -d -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" -e "OPENSEARCH_INITIAL_ADMIN_PASSWORD=<custom-admin-password>" opensearchproject/opensearch:latest
102+
```
103+
Older versions do not include a password when starting:
99104
```bash
100105
# This command maps ports 9200 and 9600, sets the discovery type to "single-node" and requests the newest image of OpenSearch
101106
docker run -d -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" opensearchproject/opensearch:latest
102107
```
103-
For OpenSearch 2.12 or greater, set a new custom admin password before installation using the following command:
104-
```bash
105-
docker run -d -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" -e "OPENSEARCH_INITIAL_ADMIN_PASSWORD=<custom-admin-password>" opensearchproject/opensearch:latest
106-
```
107-
1. Send a request to port 9200. The default username and password are `admin`.
108+
1. After waiting a few minutes for OpenSearch to start, send a request to port `9200`. For versions earlier than 2.12, the default username and password are `admin`.
108109
```bash
109-
curl https://localhost:9200 -ku admin:<custom-admin-password>
110+
curl https://localhost:9200 -ku admin:"<custom-admin-password>"
110111
```
111112
{% include copy.html %}
112113

0 commit comments

Comments
 (0)