title: docker-compose single file volume sharing
body: <p>I want to connect a <code>nginx</code> and a <code>php-fpm</code> container using a unix socket and have the <code>php-fpm</code> be completely disconnected from any network for security reasons.</p>
  
  <p>I could of course just create the <code>php-fpm.sock</code> file somewhere on my docker host and mount it into both containers, however I would like the socket file to be automatically cleaned when the containers shut down and not have to worry about creating / shipping it with my <code>docker-compse.yml</code>. I therefore thought about creating a named volume in <code>docker-compose</code> and mount it as <code>/var/run/</code>. This is however (I think) not good, because I don't want everything in <code>/var/run/</code> to be shared, but only <code>php-fpm.sock</code>. Is there a way to create a named single-file volume in docker-compose?</p>