Browse Source

[DOCS] Update Docker commands with variables (#80885)

* [DOCS' Update Docker commands with variables

* Modify "VERSION" to lowercase

Co-authored-by: James Rodewig <james.rodewig@elastic.co>

* Remove errant + icons

Co-authored-by: James Rodewig <james.rodewig@elastic.co>
Adam Locke 3 years ago
parent
commit
2d83013fe8

+ 2 - 1
docs/reference/setup/install/.env

@@ -1,3 +1,4 @@
 COMPOSE_PROJECT_NAME=es
 CERTS_DIR=/usr/share/elasticsearch/config/certificates
-ELASTIC_PASSWORD=<password>
+ELASTIC_PASSWORD=<password>
+VERSION={version}

+ 1 - 1
docs/reference/setup/install/create-certs.yml

@@ -3,7 +3,7 @@ version: "2.2"
 services:
   create_certs:
     container_name: create_certs
-    image: docker.elastic.co/elasticsearch/elasticsearch:7.15.1
+    image: docker.elastic.co/elasticsearch/elasticsearch:{version}
     command: >
       bash -c '
         if [[ ! -f /certs/bundle.zip ]]; then

+ 4 - 4
docs/reference/setup/install/docker-compose.yml

@@ -3,7 +3,7 @@ version: "2.2"
 services:
   es01:
     container_name: es01
-    image: { docker-image }
+    image: {docker-repo}:{version}
     environment:
       - node.name=es01
       - discovery.seed_hosts=es02,es03
@@ -31,7 +31,7 @@ services:
 
   es02:
     container_name: es02
-    image: { docker-image }
+    image: {docker-repo}:{version}
     environment:
       - node.name=es02
       - discovery.seed_hosts=es01,es03
@@ -53,7 +53,7 @@ services:
 
   es03:
     container_name: es03
-    image: { docker-image }
+    image: {docker-repo}:{version}
     environment:
       - node.name=es03
       - discovery.seed_hosts=es01,es02
@@ -74,7 +74,7 @@ services:
     volumes: ["data03:/usr/share/elasticsearch/data", "certs:$CERTS_DIR"]
 
   wait_until_ready:
-    image: docker.elastic.co/elasticsearch/elasticsearch:7.15.1
+    image: {docker-repo}:{version}
     command: /usr/bin/true
     depends_on: { "es01": { "condition": "service_healthy" } }
 

+ 0 - 4
docs/reference/setup/install/docker.asciidoc

@@ -179,7 +179,6 @@ When you run the example, {es} uses this file to create a three-node cluster.
 The nodes are named `es01`, `es02`,and `es03`.
 
 ifeval::["{release-state}"=="unreleased"]
-+
 --
 WARNING: Version {version} of {es} has not yet been released, so a
 `docker-compose.yml` is not available for this version.
@@ -204,7 +203,6 @@ the `ELASTIC_PASSWORD` variable. This variable is referenced by the
 `docker-compose.yml` file.
 
 ifeval::["{release-state}"=="unreleased"]
-+
 --
 WARNING: Version {version} of {es} has not yet been released, so a
 `docker-compose.yml` is not available for this version.
@@ -236,7 +234,6 @@ and a certificate authority (CA) certificate and key where {es} expects them.
 These certificates and key are placed in a Docker volume named `es_certs`.
 
 ifeval::["{release-state}"=="unreleased"]
-+
 --
 WARNING: Version {version} of {es} has not yet been released, so a
 `docker-compose.yml` is not available for this version.
@@ -271,7 +268,6 @@ with `127.0.0.1:9200:9200` in the `docker-compose.yml` file. {es} will then only
 be accessible from the host machine itself.
 
 ifeval::["{release-state}"=="unreleased"]
-+
 --
 WARNING: Version {version} of {es} has not yet been released, so a
 `docker-compose.yml` is not available for this version.