I'm new on both Elasticsearch and Docker and I have some questions about them. I retrieved docker/elastic image via the following command:
And I started it in this way:
docker run -p 9200:9200 -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" docker.elastic.co/elasticsearch/elasticsearch:5.4.2
Here are my questions:
1 I know from docker documentation that "docker run" commands is used to run a specific command inside a container. So according to the previous one, what's the unix command?
docker run -p 9200:9200 (Publish all exposed ports to random ports) -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" (Set environment variables) docker.elastic.co/elasticsearch/elasticsearch:5.4.2 (image name)
So where is the command? I suspect it's like elasticsearch starts together with the container. If so, how image's creator did that?
2 What's the best way of running the container without elastic's stdout?
3 I tried to build a custom docker image based on CentOS in which I would like to install elasticsearch like a service (via rpm). Installation works fine but when I try to run elasticsearch.service via systemctl I get the following error:
Failed to get D-Bus connection: Operation not permitted
How can I solve this?