Saturday, February 19, 2022

[SOLVED] Error while execing a docker image

Issue

I am building an centos image CentOS 7.2.1511 from CentOs 7.2 docker image.

After i run the image with command docker run -d --name centos centos

I execed a new shell with docker exec -user root centos

Inside the new shell i tried installing mysql and start mysql with the command. service mysqld start

The mysqld start command is failing with below message

Failed to get D-Bus connection: Operation not permitted.

Any idea what could be the issue here?


Solution

Please use this command to start

CMD ["/usr/sbin/init"]



Answered By - Code Poet
Answer Checked By - Gilberto Lyons (WPSolving Admin)