Docker Community Forums

Share and learn in the Docker community.

Mount root fs read only with docker-compose

(Floriankammermann) #1

I try to apply the docker CIS (

The test 5.13 is: Mount container’s root filesystem as read only
There is an option for docker run to mount the root FS read only: --read-only=true
But I can’t find the possibility to achieve the same with docker-compose.

Is there a possibility to mount the root FS read only with docker-compose?

(Ron Peleg) #2

Hi this can be done by adding read_only: true to the service description, see also