Why is my Bind9 Docker container crashing in recursive mode?

0
0
Asked By CuriousCat123 On

Hey folks, I'm working on setting up a Bind9 recursive container and I'm running into some issues. I managed to run it with a basic named.conf configuration, but it's not what I need. I'm trying to use a different config that includes forwarders and additional settings, but the container keeps crashing with an exit code 1. Here's the working config:

```
# named.conf
options {
directory "/var/cache/bind";
recursion yes;
allow-query { any; };
};

zone "example.com" IN {
type master;
file "/etc/bind/zones/db.example.com";
};
```

And here's the config that crashes:
```
# named.conf
options {
directory "/var/cache/bind";
recursion yes;
allow-query { any; };
forward only;
listen-on { any; };
listen-on-v6 { any; };
};

zone "testzone.net" IN {
type forward;
forward only;
forwarders { 172.0.200.3; };
};

zone "." IN {
type forward;
forward only;
forwarders {
8.8.8.8;
8.8.4.4;
1.1.1.1;
1.0.0.1;
};
};
```

When I run `docker compose up`, I just see repeated exit messages with code 1. My docker-compose.yml hasn't changed either. I'm running this on Debian 13 with Docker version 28.4.0. Any advice would be super helpful! Thanks!

1 Answer

Answered By TechGuru99 On

It looks like you're having issues with the Docker container not starting properly. The logs you shared are more about Docker itself, not your Bind9 instance. It seems like your container is just restarting non-stop. Make sure to check the actual Bind9 logs on your mapped filesystem, which should give you more insight into what's going wrong.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.