dotcloud/docker — pull request #5560 by gabrtv (2014-05-02 19:30:08+00:00)
Title: De-register containers before removing driver and containerGraph references

This is required to address a race condition described in #5553,
where a container can be partially deleted -- for example, the
root filesystem but not the init filesystem -- which makes
it impossible to delete the container without re-adding the
missing filesystems manually.

This behavior has been witnessed when rebooting boxes that
are configured to remove containers on shutdown in parallel
with stopping the Docker daemon.

Docker-DCO-1.1-Signed-off-by: Gabriel Monroy (github: gabrtv)