pschiffe / docker-pdns

Docker images for PowerDNS
MIT License
274 stars 81 forks source link

Alpine build from static and uwsgi containers #106

Closed almereyda closed 1 year ago

almereyda commented 1 year ago

In continuation of #74, it seems those errors are related to older Docker Engine versions:

Sometimes Docker cannot be updated, when the host operating system is EOL, e.g. Ubuntu 16.04.

Similar errors also happen in the uwsgi container:

# docker-compose run --rm --entrypoint /bin/bash pdns-admin-uwsgi -c 'dnf update'
Starting pdns_mariadb_1 ... done
Fedora 37 - x86_64                                                                                                           0.0  B/s |   0  B     00:00
Errors during downloading metadata for repository 'fedora':
  - Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-37&arch=x86_64 [getaddrinfo() thread failed to star
t]
Error: Failed to download metadata for repo 'fedora': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.fedo
raproject.org/metalink?repo=fedora-37&arch=x86_64 [getaddrinfo() thread failed to start]

It is not the name resolution, which is not working here:

# docker-compose run --rm --entrypoint /bin/bash pdns-admin-uwsgi -c "pip3 install pythonping; python3 -c 'from pythonping imp
ort ping; ping(\"mirrors.fedoraproject.org\", verbose=True)'"
Starting pdns_mariadb_1 ... done
Collecting pythonping
  Downloading pythonping-1.1.4-py3-none-any.whl (16 kB)
Installing collected packages: pythonping
Successfully installed pythonping-1.1.4
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use
a virtual environment instead: https://pip.pypa.io/warnings/venv
Reply from 18.159.254.57, 29 bytes in 4.92ms
Reply from 18.159.254.57, 29 bytes in 4.91ms
Reply from 18.159.254.57, 29 bytes in 4.99ms
Reply from 18.159.254.57, 29 bytes in 4.98ms

thread failed to start is our pointer here. Unfortunately it also seems there's nothing we can do here, but to a) upgrade the host system/Docker or b) use container images building on older/different base images.

Meaning: Would it be possible to build the static and uwsgi containers also with alpine?

pschiffe commented 1 year ago

hi @almereyda, I understand the issue; I think the source of this is the newer glibc versions, and yes, alpine is not using glibc. There was an attempt to have alpine version of pdns admin some time ago, but it didn't go well. I can try to revisit this, but I cannot promise anything.

almereyda commented 1 year ago

Thank you for caring!

It appears this does not affect python, nor the static service:

I have PowerDNS-Admin happily running on that old Ubuntu 16.04 with Docker 20.10 and Docker Compose 1.25.

Maybe this is not needed at all.

Now I have to find a way to import existing PowerDNS zones into PowerDNS-Admin, but that's not an issue here.

Sorry for the interruption.

pschiffe commented 1 year ago

Great, glad to hear that and good luck. FYI, I've just updated the images with new base image version and a new pdns admin version. Enjoy (assuming it will still work :sweat_smile:)