# Useful when we need to build a single dockerfile to run a complete webservice ARG BASE_IMAGE=python:3.14-bookworm FROM $BASE_IMAGE as base_image ENV PORT=8000 RUN apt-get update RUN apt-get install -y debian-keyring debian-archive-keyring apt-transport-https RUN curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg RUN curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list RUN apt-get update RUN apt install caddy ENV XDG_CONFIG_HOME /config ENV XDG_DATA_HOME /data EXPOSE 80 EXPOSE 443 EXPOSE 443/udp EXPOSE 2019 COPY Caddyfile /etc/caddy/Caddyfile CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]