FROM ghcr.io/martialbe/one-api as builder FROM --platform=$BUILDPLATFORM caddy:2.6.2-alpine AS runner RUN apk update \ && apk upgrade \ && apk add --no-cache ca-certificates tzdata \ && update-ca-certificates 2>/dev/null || true COPY --from=builder /one-api /usr/local/bin/one-api WORKDIR /app COPY Caddyfile ./Caddyfile RUN touch /app/caddy.log && chmod 777 -R /app/caddy.log RUN chmod 777 -R /app EXPOSE 3001 CMD ["sh", "-c", "caddy run --config /app/Caddyfile & /usr/local/bin/one-api"]