I am trying to set a Docker writable volume as a read-only child, but I get this error:
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"
I am working with a WordPress image, and the two volumes I want to install are:
- / var / www / html / wp-content: contains my development code. Read only, as I don't want any unexpected changes.
- / var / www / html / wp-content / uploads: files that are uploaded by users. Must be writable.
A quick solution is to move the downloads to another location, but I would prefer a Docker solution.
The corresponding bits of my docker-compose.yml are:
volumes:
uploads:
driver: local
services:
wordpress:
volumes:
- /dev/workspace/wp-content/:/var/www/html/wp-content/
- uploads:/var/www/html/wp-content/uploads
source
share