FROM caddy:2-alpine

RUN apk update && \
  apk upgrade && \
  rm -rf /var/cache/apk/*

COPY --chown=65534:65534 out /srv

COPY --chown=65534:65534 ./Caddyfile /etc/caddy/Caddyfile

USER nobody

CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]
