bflad/chef-docker — pull request #172 by jperville (2014-06-24 10:08:39+00:00)
Title: Generate no cidfile by default, even when deploying as service.

This PR remove the default value of `/var/run/#{service_name}.cid` when deploying container as a service. In other words, this means that containers will be deployed without a cidfile unless docker_container is configured with an explicit value for its cidfile attribute.

The main reason for that (slightly breaking) change is that :
- cidfiles are created by default in `/var/run` which is flushed at every reboot (tmpfs)
- `docker start` won't recreate cidfiles (only `docker run --cidfile` will)

My conclusion is that since the cidfiles we generate in `/var/run` do not survive reboots they cannot be relied upon and should not be generated by default.

My other reasons:
* containers can run just fine without cidfiles
* the service scripts do not use them (`fgrep -r cid` shows that no code depends on them in the cookbook)
* cidfiles complicate redeploys (`docker run` won't recreate a named container when there is a stale cidfile, see #164)

In the past I hacked around the cidfile issue by configuring my docker_container resources with `cidfile ''` but recent dockers (post 0.9) choke when `docker run` is invoked with `--cidfile=''`.