Open gargworld opened 4 years ago
Probably need to start the container privileged
This worked for me:
Dockerfile:
FROM centos/systemd:latest RUN yum -y install openssh-server openssh-clients CMD ["/bin/bash", "-c", "/usr/sbin/init"]
Part of docker-compose: service_test: build: dockerfile: service_dockerfile cap_add: [NET_ADMIN] privileged: true container_name: service_test hostname: service_test
When I run systemctl command inside the container, I get D-Bus connection error root@3924d7bb5e59 /]# systemctl status httpd Failed to get D-Bus connection: Operation not permitted
can someone help or suggest what am I doing wrong.