bflad/chef-docker — pull request #164 by jperville (2014-06-11 16:16:46+00:00)
Title: Removing a container also removes its cidfile.

Running a named container fails when its cidfile already exists (eg. left over from a previous deployment).

How to reproduce:

```sh
vagrant@default-ubuntu-1404:~$ sudo docker run --cidfile="/var/run/my-sample-app-0.cid" --detach=true --env-file="/etc/sample-docker-app.conf" --name="sample-docker-app-0" --publish="7022:22" --publish="7080:80" --volume="/var/log/nginx:/var/log/nginx/sample-docker-app" docker.si.perfect-memory.com/sample-docker-app:latest /sbin/my_init --enable-insecure-key
a1628f0d268404532cd19b0c8eadd2c01f8bb4558b174ebe8993ea946386e00d
vagrant@default-ubuntu-1404:~$ sudo docker rm -f sample-docker-app-0
sample-docker-app-0
vagrant@default-ubuntu-1404:~$ sudo docker run --cidfile="/var/run/my-sample-app-0.cid" --detach=true --env-file="/etc/sample-docker-app.conf" --name="sample-docker-app-0" --publish="7022:22" --publish="7080:80" --volume="/var/log/nginx:/var/log/nginx/sample-docker-app" docker.si.perfect-memory.com/sample-docker-app:latest /sbin/my_init --enable-insecure-key
2014/06/11 15:17:32 Container ID file found, make sure the other container isn't running or delete /var/run/my-sample-app-0.cid
```

This PR removes the cidfile every time the container is removed (during redeploy) so that the container can be recreated safely, as suggested by the `docker run` error message in the above example.