Butterfly Coder
Butterfly Coder

Reputation: 307

Error while execing a docker image

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?

Upvotes: 0

Views: 345

Answers (1)

Code Poet
Code Poet

Reputation: 96

Please use this command to start

CMD ["/usr/sbin/init"]

Upvotes: 1

Related Questions