If runc was SIGKILL'd or something happened and the container was not
able to start and runc died as well then we could get into the state
where `$root/<containerid>` exists but `$root/<containerid>/state.json`
does not. This will not allow libcontainer to load the container to
call the delete function as it has no data on the container other than
its id. We should just remove it in runc so that that system matches
what runc sees for the container.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
By adding detach to runc the container process is the only thing running
on the system is the containers process.
This allows better usage of memeory and no runc process being long
lived. With this addition you also need a delete command because the
detached container will not be able to remove state and the left over
cgroups directories.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>