haschibaschi
haschibaschi

Reputation: 2792

mount root FS read only with docker-compose

I try to apply the docker CIS (https://github.com/docker/docker-bench-security)

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?

Upvotes: 5

Views: 6720

Answers (1)

dnephin
dnephin

Reputation: 28050

Yes, you can use read_only: in the compose file https://docs.docker.com/compose/compose-file/#read_only

Upvotes: 2

Related Questions