Reputation: 6094
I am experimenting to let container terminate itself (for example, when it detects exception). But shutdown seems not working. Here is what I run inside the container.
$ sudo shutdown -h now
shutdown: Unable to shutdown system
Broadcast message from ...
The system is going down for halt NOW!
When hitting "Enter", it comes back.
Is it possible to do so?
Upvotes: 2
Views: 1264
Reputation: 9894
The container stops once the entrypoint exits. If you entered in interactive mode just do ctrl + D.
Upvotes: 1