# Download Caddy binary from GitHub releases FROM ubuntu:24.04 as caddy_downloader WORKDIR /dl RUN apt update && apt install -y curl RUN curl -sL -o caddy_2.8.4_linux_amd64.tar.gz https://github.com/caddyserver/caddy/releases/download/v2.8.4/caddy_2.8.4_linux_amd64.tar.gz RUN tar -xzf caddy_2.8.4_linux_amd64.tar.gz && mv caddy /usr/local/bin FROM ubuntu:24.04 WORKDIR /build RUN apt update && apt install -y tzdata net-tools && apt clean COPY --from=caddy_downloader /usr/local/bin/caddy /usr/local/bin/caddy COPY ./static /usr/share/caddy/babypool.lol COPY ./Caddyfile /etc/caddy/Caddyfile CMD ["caddy", "run", "--config=/etc/caddy/Caddyfile", "--adapter=caddyfile"]