Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDNS_ Env variables are not applied #14951

Open
2 tasks done
GVALFER opened this issue Dec 10, 2024 · 0 comments
Open
2 tasks done

PDNS_ Env variables are not applied #14951

GVALFER opened this issue Dec 10, 2024 · 0 comments

Comments

@GVALFER
Copy link

GVALFER commented Dec 10, 2024

Short description

The PowerDNS pdns-auth-49 Docker image does not automatically translate environment variables prefixed with PDNS_ into the /etc/powerdns/pdns.conf file, even though this behavior is expected and documented. This makes it necessary to manually append the required configurations to the pdns.conf file.

Environment

  • Operating system: Ubuntu 22.04
  • Software version: PowerDNS Authoritative Server 4.9.2
  • Software source: Docker Hub (powerdns/pdns-auth-49)

Steps to reproduce

  1. Use the docker-compose.yml file:
    services:
      powerdns:
        image: powerdns/pdns-auth-49:latest
        container_name: pdns
        restart: always
        ports:
          - "5353:53/tcp"
          - "5353:53/udp"
          - "8081:8081"
        environment:
          - PDNS_API=yes
          - PDNS_API_KEY=TestKey123
          - PDNS_WEBSERVER=yes
          - PDNS_WEBSERVER_ADDRESS=0.0.0.0
          - PDNS_WEBSERVER_PORT=8081
          - PDNS_WEBSERVER_ALLOW_FROM=0.0.0.0/0,::/0
          - PDNS_LAUNCH=gsqlite3
          - PDNS_GSQLITE3_DATABASE=/var/lib/powerdns/pdns.sqlite3
        volumes:
          - pdns_data:/var/lib/powerdns
    volumes:
      pdns_data:
    
  2. Run:
    docker compose up -d
    docker exec -it pdns cat /etc/powerdns/pdns.conf
    
    local-address=0.0.0.0,::
    launch=gsqlite3
    gsqlite3-dnssec
    gsqlite3-database=/var/lib/powerdns/pdns.sqlite3
    include-dir=/etc/powerdns/pdns.d
    

Other information

To make the API work, I had to manually append the missing configurations to /etc/powerdns/pdns.conf:

docker exec -u root -it pdns sh -c "echo '
api=yes
webserver=yes
webserver-address=0.0.0.0
webserver-port=8081
api-key=TestKey123
webserver-allow-from=0.0.0.0/0,::/0
' >> /etc/powerdns/pdns.conf"




@GVALFER GVALFER changed the title Env variables API are not applied PDNS_ Env variables are not applied Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant