I've been playing around with creating an elastic docker image. Quite easy to get a default image running.
However, I want to automatically add some index templates to the image.
In 1.x it was possible to add those templates to the config folder, but in 2.x I need to add them using the REST endpoint. Which means I need to wait for elastic to start, then run a couple of curl commands to create the templates.
What would be the best way to do this automatically after starting the docker image?
If I understand correctly, running elastic as a background process when starting the docker container (and then running a couple of curl commands) would be bad practice, as this would make it harder for orchestration services to detect if a container has failed to start or has crashed.
Does anyone has some tips or tricks?