FROM golang:alpine AS builder RUN apk add --no-cache git ENV GOTOOLCHAIN=auto WORKDIR /app RUN --mount=type=secret,id=GH_REPO,required=true \ git clone $(cat /run/secrets/GH_REPO) . RUN go mod tidy RUN go build -o solver ./main.go FROM alpine:latest WORKDIR /app RUN apk add --no-cache \ chromium \ xvfb \ bash \ ca-certificates \ ttf-freefont \ udev COPY --from=builder /app/solver . ENV DEBUG=1 \ PORT=7860 \ XVFB_DISPLAY_BASE=99 \ ALLOW_NO_SANDBOX=true \ CHROME_PATH=/usr/bin/chromium-browser EXPOSE 7860 CMD ["./solver"]