dotcloud/docker — pull request #1145 by karanlyons (2013-07-05 23:19:28+00:00)
Title: Mount /dev/shm as a tmpfs

Fixes #1122 (Re-forked from the current head).

The issue as explained by @jpetazzo (far better than I could):

>The problem comes from the fact that Docker containers do not have `/dev/shm` mounted as `tmpfs`.
The Python package tries to create a file in `/dev/shm`, but before doing so, it checks if `/dev/shm` is indeed a temporary filesystem. If it's not, it will go through `/proc/mounts` to find one. Unfortunately, for a reason that I can't explain, `/etc/resolv.conf` (which is a bind mount on a *file*) will appear as being of type `/dev/shm` and will confuse the multiprocessing module.
>
>Fix: as mentioned, uncomment the line that will setup `/dev/shm` to be a `tmpfs` within the container.