- I have a Docker image based on
- I have two Docker volumes for saving files that need to be persisted.
- On container start, I run Certbot to install HTTPs certificates.
I discovered that my application can't write to Docker volumes.
ls -l I found out that the mountpoints of my volumes are owned by user
drwxr-xr-x 4 1451 users 176128 Mar 12 13:25 volume_mountpoint
My web server is running under user
I've tried setting the user under which my container runs to
www-data. This caused the volume mountpoints to be owned by
www-data, which fixed the permissions issue. The problem with this solution is that
root permissions and fails to acquire HTTPs certificate without it.
What is the proper way to fix this issue? I need
Certbot to run under root, but let mountpoints to be owned by