title: Shared Memory with Docker containers (docker version 1.4.1)
body: <p>I have 1 process that writes to a specific section of shared memory (i.e. "/falcon" )in a docker container.</p>
  
  <p><strong>Docker image: dockersharedmemory/shmclient</strong></p>
  
  <p>I have another process that initially creates and reads the same section of shared memory(i.e. "/falcon" ) every second in another docker container.</p>
  
  <p><strong>Docker image: dockersharedmemory/shmserver</strong></p>
  
  <p>When I run the two containers using the following commands I am able to read and write in each container respectfully:</p>
  
  <p><code>docker run -d -v /dev:/dev dockersharedmemory/shmserver</code></p>
  
  <p><code>docker run -d -v /dev:/dev dockersharedmemory/shmclient</code></p>
  
  <p>When I use the <strong>"--ipc"</strong> option per <a href="http://docs.docker.com/reference/run/#ipc-settings" rel="nofollow">documentation</a> i can't get it to work:</p>
  
  <p><code>docker run -d --ipc=host dockersharedmemory/shmserver</code></p>
  
  <p><code>docker run -d --ipc=host dockersharedmemory/shmclient</code></p>
  
  <p>neither</p>
  
  <p><code>docker run -d dockersharedmemory/shmserver</code></p>
  
  <p><code>drunk_feynman</code></p>
  
  <p><code>docker run -d --ipc=container:drunk_feynman dockersharedmemory/shmclient</code></p>
  
  <p><code>happy_fermi</code></p>
  
  <p>Client version: 1.4.1<br>
  Client API version: 1.16<br>
  Go version (client): go1.3.3<br>
  Git commit (client): 5bc2ff8/1.4.1<br>
  OS/Arch (client): linux/amd64<br>
  Server version: 1.4.1<br>
  Server API version: 1.16<br>
  Go version (server): go1.3.3<br>
  Git commit (server): 5bc2ff8/1.4.1  </p>
  
  <p>I have a working example now with a combination of the commands on the host by punching huge holes in the container with a combination of volumes and ipc:
  <code>docker run -d -v /dev/shm:/dev/shm --ipc=host dockersharedmemory/shmserver</code>
  <code>docker run -d -v /dev/shm:/dev/shm --ipc=host dockersharedmemory/shmclient</code></p>