ElasticSearch docker container that supports Azure Container Instances.
Basically it overrides the official container and allows to set ElasticSearch configuration variables that contains dots (.
) by replacing them with triple underscore (___
). Example: discovery___type=single-node
instead of discovery.type=single-node
.
Here are some snippets to help get started creating a docker container.
docker create \
--name=elasticsearch-azure \
-e discovery___type=single-node \
-e ELASTIC_PASSWORD=PleaseChangeMe \
-e xpack___license___self_generated___type=trial \
-e xpack___security___enabled=true \
-p 9200:9200 \
-p 9300:9300 \
--restart unless-stopped \
-m 2g \
thilas/elasticsearch-azure
See ElasticSearch configuration variables. Just replace all dots (.
) in variable names by triple underscore (___
).
Example: discovery___type=single-node
instead of discovery.type=single-node
.
- Shell access on the container:
docker exec -it elasticsearch-azure /bin/bash
- Realtime logs of the container:
docker logs -f elasticsearch-azure
Here are some instructions to update an existing container.
- Update the image:
docker pull thilas/elasticsearch-azure
- Stop the running container:
docker stop elasticsearch-azure
- Delete the container:
docker rm elasticsearch-azure
- Recreate a new container with the same docker create parameters as instructed above
- Start the new container:
docker start elasticsearch-azure
- You can also remove the old dangling images:
docker image prune
- Update all images:
docker-compose pull
- or update a single image:
docker-compose pull elasticsearch-azure
- or update a single image:
- Let compose update all containers as necessary:
docker-compose up -d
- or update a single container:
docker-compose up -d elasticsearch-azure
- or update a single container:
- You can also remove the old dangling images:
docker image prune