fabself
fabself

Reputation: 31

How to reboot centos in docker?

How to reboot centos in docker ?

I had pulled centos 7 from docker

use the 'shutdown -r now'

The console said 'Failed to talk to init daemon.'

I also used 'reboot -f' , and get the 'Rebooting. Failed to reboot: Operation not permitted' for rsp

Upvotes: 3

Views: 3461

Answers (2)

Lord Johar
Lord Johar

Reputation: 129

Why you want to restart container?

if it is necessary you can use docker exec -it <container name> reboot or you can stop container and start it again docker stop -f <container name> then docker start <container name>

Upvotes: 1

PdM
PdM

Reputation: 74

Assuming you are logged in to your container and trying to "reboot" the container:

e.g. docker run -i -t centos /bin/bash and then reboot

You shouldn't do is.

Please use docker run/start/stop....

Upvotes: 0

Related Questions