Running elasticsearch in Docker Containers
Let's start filling your head!
$> docker run -i -t python:2 $> docker run -i -t python:3
Note:
$> docker run -it -p 8888:8888 \ python:3 python -m http.server 8888 $> curl -i <server>:8888
$> docker run -it -d --name utnubu ubuntu $> docker inspect utnubu | jq '.' $> docker stats $(docker ps -l -q) $> docker exec -it utnubu /bin/bash $> # ps, top, uname -a, apt-get, what you want
We use the official Docker-Hub image
Look into the latest Dockerfile
Grab the Container
docker pull elasticsearch
Start a node and expose the ports
docker run --name trick -d -p 9200:9200 \
-p 9300:9300 elasticsearch
Check the HTTP interface
curl -L http://$(docker-machine ip):9200
docker run --name track --link trick -d elasticsearch
curl http://$(docker-machine ip):9200/_cluster/health
Let's git clone elasticsearch-head and connect to the cluster
Anything else?
User friendly & lightweight
Solves the dependency hell
Reusability by design
Client/server RESTful communication API
Promotes github-like community and collaboration through a public registry
Data in- and output is
(tar-)file based
Massive, growing ecosystem
Dockerfiles feel restrictive and dowdy compared to ansible playbooks for example
No orchestration built in, but the situation is getting better
The Docker volumes are an afterthought, not a first class citizen (yet?) and not every subcommand can deal with them
Linux only
Security (privilege-escalation)