@@ -39,7 +39,7 @@ adjust memory usage in Docker Desktop by going to **Settings > Resources**.
3939----
4040docker network create elastic
4141----
42-
42+ // REVIEWED[DEC.10.24]
4343. Pull the {es} Docker image.
4444+
4545--
@@ -52,10 +52,11 @@ endif::[]
5252----
5353docker pull {docker-image}
5454----
55+ // REVIEWED[DEC.10.24]
5556--
5657
5758. Optional: Install
58- https://docs.sigstore.dev/system_config/installation/[Cosign] for your
59+ https://docs.sigstore.dev/cosign/ system_config/installation/[Cosign] for your
5960environment. Then use Cosign to verify the {es} image's signature.
6061+
6162[[docker-verify-signature]]
@@ -64,6 +65,7 @@ environment. Then use Cosign to verify the {es} image's signature.
6465wget https://artifacts.elastic.co/cosign.pub
6566cosign verify --key cosign.pub {docker-image}
6667----
68+ // REVIEWED[DEC.10.24]
6769+
6870The `cosign` command prints the check results and the signature payload in JSON format:
6971+
@@ -75,13 +77,15 @@ The following checks were performed on each of these signatures:
7577 - Existence of the claims in the transparency log was verified offline
7678 - The signatures were verified against the specified public key
7779----
80+ // REVIEWED[DEC.10.24]
7881
7982. Start an {es} container.
8083+
8184[source,sh,subs="attributes"]
8285----
8386docker run --name es01 --net elastic -p 9200:9200 -it -m 1GB {docker-image}
8487----
88+ // REVIEWED[DEC.10.24]
8589+
8690TIP: Use the `-m` flag to set a memory limit for the container. This removes the
8791need to <<docker-set-heap-size,manually set the JVM size>>.
@@ -95,6 +99,7 @@ If you intend to use the {ml} capabilities, then start the container with this c
9599----
96100docker run --name es01 --net elastic -p 9200:9200 -it -m 6GB -e "xpack.ml.use_auto_machine_memory_percent=true" {docker-image}
97101----
102+ // REVIEWED[DEC.10.24]
98103The command prints the `elastic` user password and an enrollment token for {kib}.
99104
100105. Copy the generated `elastic` password and enrollment token. These credentials
@@ -106,20 +111,23 @@ credentials using the following commands.
106111docker exec -it es01 /usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic
107112docker exec -it es01 /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana
108113----
114+ // REVIEWED[DEC.10.24]
109115+
110116We recommend storing the `elastic` password as an environment variable in your shell. Example:
111117+
112118[source,sh]
113119----
114120export ELASTIC_PASSWORD="your_password"
115121----
122+ // REVIEWED[DEC.10.24]
116123
117124. Copy the `http_ca.crt` SSL certificate from the container to your local machine.
118125+
119126[source,sh]
120127----
121128docker cp es01:/usr/share/elasticsearch/config/certs/http_ca.crt .
122129----
130+ // REVIEWED[DEC.10.24]
123131
124132. Make a REST API call to {es} to ensure the {es} container is running.
125133+
@@ -128,6 +136,7 @@ docker cp es01:/usr/share/elasticsearch/config/certs/http_ca.crt .
128136curl --cacert http_ca.crt -u elastic:$ELASTIC_PASSWORD https://localhost:9200
129137----
130138// NOTCONSOLE
139+ // REVIEWED[DEC.10.24]
131140
132141===== Add more nodes
133142
@@ -137,6 +146,7 @@ curl --cacert http_ca.crt -u elastic:$ELASTIC_PASSWORD https://localhost:9200
137146----
138147docker exec -it es01 /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node
139148----
149+ // REVIEWED[DEC.10.24]
140150+
141151The enrollment token is valid for 30 minutes.
142152
@@ -146,6 +156,7 @@ The enrollment token is valid for 30 minutes.
146156----
147157docker run -e ENROLLMENT_TOKEN="<token>" --name es02 --net elastic -it -m 1GB {docker-image}
148158----
159+ // REVIEWED[DEC.10.24]
149160
150161. Call the <<cat-nodes,cat nodes API>> to verify the node was added to the cluster.
151162+
@@ -154,6 +165,7 @@ docker run -e ENROLLMENT_TOKEN="<token>" --name es02 --net elastic -it -m 1GB {d
154165curl --cacert http_ca.crt -u elastic:$ELASTIC_PASSWORD https://localhost:9200/_cat/nodes
155166----
156167// NOTCONSOLE
168+ // REVIEWED[DEC.10.24]
157169
158170[[run-kibana-docker]]
159171===== Run {kib}
@@ -170,6 +182,7 @@ endif::[]
170182----
171183docker pull {kib-docker-image}
172184----
185+ // REVIEWED[DEC.10.24]
173186--
174187
175188. Optional: Verify the {kib} image's signature.
@@ -179,13 +192,15 @@ docker pull {kib-docker-image}
179192wget https://artifacts.elastic.co/cosign.pub
180193cosign verify --key cosign.pub {kib-docker-image}
181194----
195+ // REVIEWED[DEC.10.24]
182196
183197. Start a {kib} container.
184198+
185199[source,sh,subs="attributes"]
186200----
187201docker run --name kib01 --net elastic -p 5601:5601 {kib-docker-image}
188202----
203+ // REVIEWED[DEC.10.24]
189204
190205. When {kib} starts, it outputs a unique generated link to the terminal. To
191206access {kib}, open this link in a web browser.
@@ -198,6 +213,7 @@ To regenerate the token, run:
198213----
199214docker exec -it es01 /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana
200215----
216+ // REVIEWED[DEC.10.24]
201217
202218. Log in to {kib} as the `elastic` user with the password that was generated
203219when you started {es}.
@@ -208,6 +224,7 @@ To regenerate the password, run:
208224----
209225docker exec -it es01 /usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic
210226----
227+ // REVIEWED[DEC.10.24]
211228
212229[[remove-containers-docker]]
213230===== Remove containers
@@ -226,6 +243,7 @@ docker rm es02
226243# Remove the {kib} container
227244docker rm kib01
228245----
246+ // REVIEWED[DEC.10.24]
229247
230248===== Next steps
231249
@@ -306,6 +324,7 @@ ES_PORT=127.0.0.1:9200
306324----
307325docker-compose up -d
308326----
327+ // REVIEWED[DEC.10.24]
309328
310329. After the cluster has started, open http://localhost:5601 in a web browser to
311330access {kib}.
@@ -321,6 +340,7 @@ is preserved and loaded when you restart the cluster with `docker-compose up`.
321340----
322341docker-compose down
323342----
343+ // REVIEWED[DEC.10.24]
324344
325345To delete the network, containers, and volumes when you stop the cluster,
326346specify the `-v` option:
@@ -329,6 +349,7 @@ specify the `-v` option:
329349----
330350docker-compose down -v
331351----
352+ // REVIEWED[DEC.10.24]
332353
333354===== Next steps
334355
@@ -377,6 +398,7 @@ The `vm.max_map_count` setting must be set within the xhyve virtual machine:
377398--------------------------------------------
378399screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty
379400--------------------------------------------
401+ // REVIEWED[DEC.10.24]
380402
381403. Press enter and use `sysctl` to configure `vm.max_map_count`:
382404+
@@ -494,6 +516,7 @@ To check the Docker daemon defaults for ulimits, run:
494516--------------------------------------------
495517docker run --rm {docker-image} /bin/bash -c 'ulimit -Hn && ulimit -Sn && ulimit -Hu && ulimit -Su'
496518--------------------------------------------
519+ // REVIEWED[DEC.10.24]
497520
498521If needed, adjust them in the Daemon or override them per container.
499522For example, when using `docker run`, set:
@@ -502,6 +525,7 @@ For example, when using `docker run`, set:
502525--------------------------------------------
503526--ulimit nofile=65535:65535
504527--------------------------------------------
528+ // REVIEWED[DEC.10.24]
505529
506530===== Disable swapping
507531
@@ -518,6 +542,7 @@ When using `docker run`, you can specify:
518542----
519543-e "bootstrap.memory_lock=true" --ulimit memlock=-1:-1
520544----
545+ // REVIEWED[DEC.10.24]
521546
522547===== Randomize published ports
523548
@@ -545,6 +570,7 @@ environment variable. For example, to use 1GB, use the following command.
545570----
546571docker run -e ES_JAVA_OPTS="-Xms1g -Xmx1g" -e ENROLLMENT_TOKEN="<token>" --name es01 -p 9200:9200 --net elastic -it {docker-image}
547572----
573+ // REVIEWED[DEC.10.24]
548574
549575The `ES_JAVA_OPTS` variable overrides all other JVM options.
550576We do not recommend using `ES_JAVA_OPTS` in production.
@@ -616,6 +642,7 @@ If you mount the password file to `/run/secrets/bootstrapPassword.txt`, specify:
616642--------------------------------------------
617643-e ELASTIC_PASSWORD_FILE=/run/secrets/bootstrapPassword.txt
618644--------------------------------------------
645+ // REVIEWED[DEC.10.24]
619646
620647You can override the default command for the image to pass {es} configuration
621648parameters as command line options. For example:
0 commit comments