sameersbn / docker-bind

Dockerize BIND DNS server with webmin for DNS administration
MIT License
919 stars 333 forks source link

open: /etc/bind/named.conf: permission denied - cannot deploy in Portainer #111

Open shalak opened 3 years ago

shalak commented 3 years ago

I'm having some issues when deploying from sameersbn/bind:latest using Portainer that runs on OpenMediaVault.

I configured /data/ to be mapped to /src/dev-disk-by-uuid-XXX/sharedFolder/containers/bind, the container doesn't start. Log says:

07-Feb-2021 22:12:18.056 loading configuration from '/etc/bind/named.conf'
07-Feb-2021 22:12:18.056 open: /etc/bind/named.conf: permission denied
07-Feb-2021 22:12:18.064 loading configuration: permission denied
07-Feb-2021 22:12:18.064 exiting (due to fatal error)

The container did succeed to create some files, here's what I see on OpenMediaVault:

image

User mirek is the owner of the /src/dev-disk-by-uuid-XXX/sharedFolder/containers/bind directory. The user systemd-timesync has UID 101 and systemd-journal has GID of 101.

I tried setting the BIND_USER to mirek - did not help. When I do it, I only see the following log and no files are created in volume:

chown: invalid group: 'root:mirek'

What am I missing here? How can I force the docker-bind to always use user mirek and group users?