runc: how to start stopped container

280 views Asked by At

I am playing with raw containers. And I do not see a way to rerun a container that is currently stopped.

# runc run nginx --detach
# runc kill nginx

as the result I have got the stopped container.

How to run it again without delete?

This does not work:

# runc start nginx
ERRO[0000] cannot start a container that has stopped
1

There are 1 answers

0
TTFish On

Seems that you can not restart a container once you have killed it.

The possible solution here is to delete and then create is again.