FROM python:3.12-slim

LABEL maintainer="hostinger-dns-sync"
LABEL description="Auto-sync Hostinger DNS records from Traefik Docker labels"

WORKDIR /app

# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY dns_sync.py .

# docker.sock is mounted at runtime — no privileged flag needed
CMD ["python", "-u", "dns_sync.py"]
