Can I have a writable Docker volume mounted under a read-only volume?
<p>I'm trying to mount a writable Docker volume as a child of a read-only volume, but I get this error:</p>

<pre><code>ERROR: for wordpress  rpc error: code = 2 desc = "oci runtime error: 
could not synchronise with container process: mkdir /mnt/sda1/var/lib
/docker/aufs/mnt/.../var/www/html/wp-content/uploads: read-only file 
system"
</code></pre>

<p>I'm working with a WordPress image, and the two volumes I want to mount are:</p>

<ul>
<li>/var/www/html/wp-content: Contains my development code.  Read-only, since I don't want any unexpected changes.</li>
<li>/var/www/html/wp-content/uploads: Files that are uploaded by users.  Must be writable.</li>
</ul>

<p>The quick solution is to move <em>uploads</em> somewhere else, but I'd prefer a Docker solution.</p>

<p>Relevant bits of my docker-compose.yml:</p>

<pre><code>volumes:
  uploads:
    driver: local

services:
  wordpress:
    volumes:
      - /dev/workspace/wp-content/:/var/www/html/wp-content/
      - uploads:/var/www/html/wp-content/uploads 
</code></pre>