Ctrl K
ComunidadGuías…

Dockerfile

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
# BIND9 Web UI — API backend only. The UI lives in the webui facade,
# which proxies /api-module/bind/... here over HTTP.
FROM python:3.12-slim

ENV PYTHONUNBUFFERED=1 \
    FLASK_APP=app.py \
    SERVICE_NAME=bind9-webui \
    BIND_CONF_DIR=/etc/bind \
    RNDC_PORT=953

# rndc, named-checkzone/conf, dig, and curl for healthchecks
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
       bind9-utils bind9-dnsutils dnsutils curl \
    && rm -rf /var/lib/apt/lists/* \
    && mkdir -p /var/cache/bind /var/log/bind

WORKDIR /app

# Install deps first for better layer caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY app.py bind_manager.py metrics.py ./

# The API must write /etc/bind and run rndc, so run as root inside the container.
# Point it at named with RNDC_HOST / mount /etc/bind when using the compose stack.
EXPOSE 5000

CMD ["python", "app.py"]