Skip to content

Commit d664405

Browse files
alaudazzithbkrkr
authored andcommitted
Improve custom images docs (#1976)
1 parent 7c07895 commit d664405

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

docs/custom-images.asciidoc

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,40 @@ endif::[]
66
[id="{p}-custom-images"]
77
== Creating custom images
88

9-
It is possible to create your own custom Elasticsearch (or Kibana, etc.) image instead of using the base image provided by Elastic. You might want to do this to preload plugins in the image rather than having to link:k8s-init-containers-plugin-downloads.html[install them via init container] each time a pod starts. Note that you must use the official image as the base for it to function properly. For example, if you want to create an Elasticsearch 7.3.2 image with the https://www.elastic.co/guide/en/elasticsearch/plugins/master/repository-gcs.html[Google Cloud Storage Repository Plugin], you could create a `Dockerfile` containing:
9+
You can create your own custom Elasticsearch or Kibana image instead of using the base image provided by Elastic. You might want to do this to preload plugins in the image rather than having to link:k8s-init-containers-plugin-downloads.html[install them via init container] each time a pod starts. To do this, you must use the official image as the base for it to function properly. For example, if you want to create an Elasticsearch 7.3.2 image with the https://www.elastic.co/guide/en/elasticsearch/plugins/master/repository-gcs.html[Google Cloud Storage Repository Plugin], you can do the following:
1010

11+
. Create a `Dockerfile` containing:
12+
+
1113
----
1214
FROM docker.elastic.co/elasticsearch/elasticsearch:7.3.2
1315
RUN bin/elasticsearch-plugin install --batch repository-gcs
1416
----
1517

16-
Build the image with:
17-
18+
. Build the image with:
19+
+
1820
----
19-
docker build --tag elasticsearch-gcs:7.3.2 .
21+
docker build --tag elasticsearch-gcs:7.3.2
2022
----
2123

22-
There are various hosting options for your images. If you use Google Kubernetes Engine, it is automatically configured to use the Google Container Registry (see https://cloud.google.com/container-registry/docs/using-with-google-cloud-platform#google-kubernetes-engine[here] for more information). To use the image, you could then https://cloud.google.com/container-registry/docs/pushing-and-pulling#pushing_an_image_to_a_registry[push to the registry] with:
24+
There are various hosting options for your images. If you use Google Kubernetes Engine, it is automatically configured to use the Google Container Registry (see https://cloud.google.com/container-registry/docs/using-with-google-cloud-platform#google-kubernetes-engine[here] for more information). To use the image, you can then https://cloud.google.com/container-registry/docs/pushing-and-pulling#pushing_an_image_to_a_registry[push to the registry] with:
2325

2426
----
2527
docker tag elasticsearch-gcs:7.3.2 gcr.io/$PROJECT-ID/elasticsearch-gcs:7.3.2
2628
docker push gcr.io/$PROJECT-ID/elasticsearch-gcs:7.3.2
2729
----
2830

2931

30-
Configure your Elasticsearch spec to use the newly pushed image, for example:
32+
Configure your Elasticsearch specification to use the newly pushed image, for example:
3133

3234
[source,yaml]
3335
----
3436
spec:
3537
image: gcr.io/$PROJECT-ID/elasticsearch-gcs:7.3.2
3638
----
3739

38-
The steps are similar for https://docs.microsoft.com/en-us/azure/aks/tutorial-kubernetes-prepare-acr[Azure Kubernetes Service] and AWS's https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-basics.html#use-ecr[Elastic Container Registry].
40+
The steps are similar for https://docs.microsoft.com/en-us/azure/aks/tutorial-kubernetes-prepare-acr[Azure Kubernetes Service] and https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-basics.html#use-ecr[AWS Elastic Container Registry].
3941

40-
[id="{p}-references"]
41-
=== References
42+
For more information, you can check the following references:
4243

4344
- https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_c_customized_image[Elasticsearch doc on creating custom images]
4445
- https://cloud.google.com/container-registry/docs/how-to[Google Container Registry docs]

0 commit comments

Comments
 (0)