# Dockerfile FROM python:3.10-slim-trixie # Set working directory WORKDIR /app # Apply security updates RUN apt update && apt-get install -y --only-upgrade $(apt-get --just-print upgrade | awk 'tolower($4) ~ /.*security.*/ || tolower($5) ~ /.*security.*/ {print $2}' | sort | uniq) && rm -rf /var/lib/apt/lists/* RUN pip install --no-cache-dir hatch # Copy first part of project that needs to be rebuilt # if it changes COPY ./pyproject.toml ./src /app/ # Pre-installed files needed at runtime RUN hatch env create default -- --no-cache-dir # Copy the rest of the project; readme and license COPY ./README.md ./LICENSE /app/ # Expose the default port the app runs on EXPOSE 5232 # Command to run the app CMD ["hatch","run","subdomain_server","--config-path","/app/config/config.yaml"]