In my Dockerfile I am trying to install multiple services and want to have them all start up automatically when I launch the container. One among the services is mysql and when I launch the container I don’t see the mysql service starting up. When I try to start manually, I get the error: Failed to get D-Bus connection: Operation not permitted
RUN yum -y install mariadb mariadb-server
CMD ["/bin/bash", “service mariadb start”]
docker build --tag=“pbellamk/mariadb” .
docker run -it -d --privileged=true pbellamk/mariadb bash
I have checked the centos:systemd image and that doesn’t help too. How do I launch the container with the services
Can someone show an example of how to start the container with 3 services(mariadb, httpd, sshd) to be running when it is launched ?
started using systemctl/service commands.