Updated Docker images (9.18, 9.20, 9.21) - now based on Alpine Linux

Ondřej Surý ondrej at isc.org
Tue Aug 27 17:08:51 UTC 2024


> On 27. 8. 2024, at 18:47, Ondřej Surý <ondrej at 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)
ondrej at isc.org

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




More information about the bind-users mailing list