I have the following Dockerfile for creating a container with a powerdns recursor in it:
FROM debian:stretch-slim ENV DEBIAN_FRONTEND noninteractive RUN apt-get update && \ apt-get install --no-install-recommends -y \ pdns-recursor && \ rm -rf /var/lib/apt/lists/* && \ apt-get clean COPY ./configuration/recursor.conf /etc/powerdns/recursor.conf RUN chown -R :pdns /etc/powerdns/ && \ chmod 0750 /etc/powerdns/ && \ chmod 0640 /etc/powerdns/recursor.conf EXPOSE 8699 ENTRYPOINT ["/usr/sbin/pdns_recursor", "--daemon=no"]
recursor.conf looks like this:
config-dir=/etc/powerdns forward-zones=resolver1.opendns.com=126.96.36.199 hint-file=/usr/share/dns/root.hints local-address=0.0.0.0 local-port=8699 quiet=yes security-poll-suffix= setgid=pdns setuid=pdns
IPv6 is disabled on the hypervisor.
The problem is that docker is not able to stop the container properly with
docker stop recursor. After some time the OOMKiller terminates the programm with the following information:
Exited (137) 2 seconds ago
I searched the web and the signals
137 mean that I don't have sufficient RAM, what is simply not the case. When I execute
docker exec -it recursor /bin/bash and try to kill PID 1 (
kill -9 -- 1) within the container I don't get any reaction - the service simply continues to run as if nothing happened.
I also tried to start the recursor in daemon-mode - same result.
Does anyone has an idea why that is so?