> On 27. 8. 2024, at 18:47, Ondřej Surý <ond...@isc.org> wrote:
> 
> But I think you are right. The default logging goes to the syslog and there's 
> no syslog
> in the container. I'm thinking about appending -L /var/log/bind/default.log 
> to the CMD
> part of the docker (so it can be easily overridden).

I've just added -L /var/log/bind/default.log to the CMD in the Docker file, 
this will cause the default logging to go to this file inside the container.

Something like this should get you going

mkdir -p /tmp/bind9/log/bind
chmod 777 /tmp/bind9/log/bind
docker run --volume /tmp/bind9/log:/var/log --name=bind9 --restart=always 
--publish 5353:53/udp --publish 5353:53/tcp internetsystemsconsortium/bind9:9.18

(I'm actually running `podman run`, so I hope the options are compatible.)

This is obviously not production ready and you should properly set --uidmap and 
--gidmap[*].
The bind user and group inside the container looks like this:

# grep bind /etc/passwd
bind:x:100:101:Linux User,,,:/var/cache/bind:/sbin/nologin

# grep bind /etc/group
bind:x:101:bind

Ondrej

* - or if running root-less, it requires properly setting up subuid(5) and 
subgid(5) - this is a bit esoteric even for me.
--
Ondřej Surý (He/Him)
ond...@isc.org

My working hours and your working hours may be different. Please do not feel 
obligated to reply outside your normal working hours.


-- 
Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from 
this list

ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

Reply via email to