UiP9AV6Y / dockerfiles

Manifests for Docker images
Apache License 2.0
11 stars 4 forks source link

PowerDNS-admin docker image error #5

Closed jerheij closed 5 years ago

jerheij commented 5 years ago

I try to use the powerdns and powerdns-admin sqlite3 docker images but I get the following error when trying to run the powerdns containers:

pdns-admin | Traceback (most recent call last):
pdns-admin | File "create_db.py", line 4, in pdns-admin | from config import SQLALCHEMY_DATABASE_URI pdns-admin | ImportError: No module named config

My docker-compose.yml:

---
version: "3"
services:
  pdns-main:
    image: uip9av6y/powerdns:sqlite3
    container_name: pdns-main
    restart: always
    environment:
      DB_HOST: /data/pdns.db
    volumes:
      - ./pdns:/data
    networks:
      - infra
  pdns-admin:
    image: uip9av6y/powerdns-admin:sqlite3
    container_name: pdns-admin
    environment:
      UWSGI_PROTOCOL: uwsgi
      POWERDNS_ADMIN_DB_URI: 'sqlite:////data/pdns-admin.db'
      POWERDNS_ADMIN_CONF: /data/config.py
      POWERDNS_ADMIN_API_URL: http://nameserver:8081/
      POWERDNS_ADMIN_API_KEY: example
      POWERDNS_ADMIN_USERNAME: admin
      POWERDNS_ADMIN_PASSWORD: admin
    volumes:
      - ./pdns-admin:/data
    networks:
      - infra
networks:
  infra:
    external: true

After running the powerdns-admin container with the "docker run" command I found out there is no pip config module installed, is this related or is my configuration wrong?

jerheij commented 5 years ago

I have cloned your github repo and added "config" to the pip install in the dockerfile to manually build and test the container with the config package. After doing this I don't get the first error any more, it changed into:

pdns-admin | Traceback (most recent call last): pdns-admin | File "create_db.py", line 4, in pdns-admin | from config import SQLALCHEMY_DATABASE_URI pdns-admin | ImportError: cannot import name SQLALCHEMY_DATABASE_URI

Any ideas?

Thanks!