1
votes

Since the command to start Influxdb (/etc/init.d/influxdb start) daemonized the process by default, so when this command is used in a Dockerfile with the CMD or ENTRYPOINT instruction, the docker container process with PID 1 would just exist after spawning the influxdb daemon when the docker image is run.

So what is the proper way to containerize InfluxDB? Is it possible to start InfluxDB in foreground mode? The InfluxDB startup script (/etc/init.d/influxdb) internally uses a command called "start-stop-daemon". How does this command interact with Docker?

There was a similar post about this topic earlier but that post recommended using Marathon, which I do not want to use. How to run InfluxDB as a foreground process on Docker using Mesos Marathon

Thanks in advance.

1

1 Answers

0
votes

Take a look at the image from tutum https://hub.docker.com/r/tutum/influxdb/
They launch InfluxDB via /opt/influxdb/influxd. It seems the command should run in foreground.