title: Read only filesystem error with docker-compose volume mounts
body: <p>I am working with docker-compose as part of a sentry on-premise install.</p>
  <p>Below is a snippet of the nginx portion of my docker-compose.yml. This is the nginx container configuration as provided to me. You'll notice it has an existing volume mount.</p>
  <pre><code>nginx:
      &lt;&lt; : *restart_policy
      ports:
        - '$SENTRY_BIND:80/tcp'
      image: 'nginx'
      volumes:
        - type: bind
          read_only: true
          source: ./nginx
          target: /etc/nginx
      depends_on:
        - web
        - relay
  </code></pre>
  <p>The problem is that I need additional mounts in order for my nginx configuration to work correctly. I need to be able to mount certs for SSL.
  When I make the following modification to the nginx portion...</p>
  <pre><code>  nginx:
      &lt;&lt; : *restart_policy
      ports:
        - '$SENTRY_BIND:80/tcp'
      image: 'nginx'
      volumes:
        - type: bind
          read_only: true
          source: ./nginx
          target: /etc/nginx
        - type: bind
          read_only: true
          source: ./certs
          target: /etc/nginx/certs
      depends_on:
        - web
        - relay
    relay:
  
  </code></pre>
  <p>... I get the following error when using docker-compose up -d:</p>
  <pre><code>Creating sentry_onpremise_nginx_1                                    ... error
  Creating sentry_onpremise_ingest-consumer_1                          ... done
  Creating sentry_onpremise_subscription-consumer-events_1             ... done
  me/brad/repo/onpremise/certs&quot; to rootfs at &quot;/var/lib/docker/overlay2/357f60b96e866d8dd84d657f7cad55fad76420a61cc8cb35a10ebcb13bcf4060/merged/etc/nginx/certs&quot; caused: mkdir /var/lib/docker/overlay2/357f60b96e866d8dd84d657f7cad55fad76420a61cc8cb35a10ebcb13bcf4060/merged/etc/nginx/certs: read-only file system: unknown
  
  ERROR: for nginx  Cannot start service nginx: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: rootfs_linux.go:60: mounting &quot;/home/brad/repo/onpremise/certs&quot; to rootfs at &quot;/var/lib/docker/overlay2/357f60b96e866d8dd84d657f7cad55fad76420a61cc8cb35a10ebcb13bcf4060/merged/etc/nginx/certs&quot; caused: mkdir /var/lib/docker/overlay2/357f60b96e866d8dd84d657f7cad55fad76420a61cc8cb35a10ebcb13bcf4060/merged/etc/nginx/certs: read-only file system: unknown
  ERROR: Encountered errors while bringing up the project.
  </code></pre>
  <p>Any help would be greatly appreciated. I'm not very experienced with docker/compose.</p>
  <p>EDIT:
  For what it's worth, when I run <code>docker exec -it sentry_onpremise_nginx_1 /bin/bash</code> and attempt to create a directory inside the container, I am presented with a similar error:</p>
  <pre><code>root@83afd0c563de:/etc/nginx# mkdir certs
  mkdir: cannot create directory 'certs': Read-only file system
  </code></pre>