I am attempting to build influxdb from scratch, using it's rpm. In my scenario I can not use the prebuilt dockerhub image. I'm running into issues when I attempt to start influxdb inside the docker container using he command systemctl start influxdb
.
I usually get the following error:
`System has not been booted with systemd as init system (PID 1). Can't operate.`
How can I start the influxdb service in the docker container?
Here my dockerfile:
FROM centos
COPY influxdb-1.7.0.x86_64.rpm /home
COPY influxdb.conf /etc/influxdb/influxdb.conf
WORKDIR /home
ENV INFLUXDB_VERSION 1.7
ARG INFLUXDB_CONFIG_PATH=/etc/influxdb/influxdb.conf
VOLUME /var/lib/influxdb
#VOLUME /sys/fs/cgroup:/sys/fs/cgroup:ro
EXPOSE 8086
RUN rpm -if influxdb-1.7.0.x86_64.rpm
#RUN systemctl start influxdb
CMD [ "/bin/bash" ]