Trying to run following command in the ubuntu 16.04 docker container
root@mytest:/Linux_Insight_Agent# systemctl start ir_agent.service
I have installed neede packages but at the time of starting the service following issue is coming.
Failed to connect to bus: No such file or directory
That's because "systemctl" talks to the systemd daemon by using the d-bus. In a container there is no systemd-daemon. Asking for a start will probably not quite do what you expect - the dev-mapping need to be a bit longer.
Another solution may be to avoid the usage of a systemd daemon with the help of the docker-systemctl-replacement script. It overwrites default systemctl however.
I had the same situation
In my case, i resolve by running docker with --volume
parameter.
example:
docker run -it \
--volume /sys/fs/cgroup:/sys/fs/cgroup:ro \
--rm IMAGE /bin/bash
I hope works for you...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With