Caddy docker container in read only mode

I tried to make Caddy container in read-only mode by inserting to docker-compose caddy service:
read_only: true
tmpfs: /run

Caddy cannot make folder for logs because in ready-only mode even tmpfs folder is there. Do you know any solution?

Please fill out the help topic template. It’s unclear what you’re asking without more detail.

Docker Tip #55: Creating Read Only Containers — Nick Janetakis.

My config is irrelevant, I just want to know is it possible and how to do it, to use caddy in read only mode. I can insert to docker-compose this

read_only: true
tmpfs: /run

Read_only mode seem to be secure, but it doesn’t allow caddy to write logs obviously. I wonder, if there is any option to use read_only mode, with full functional caddy logs. I believe caddy writes only logs.

Caddy writes certificates, keys, locks, etc to /data, and an autosave.json file to /config, to make the --resume option work if you primarily use Caddy for its API. So at minimum, those paths need to be writable.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.