abyss/Dockerfile

24 lines
353 B
Docker

FROM golang:1.23 AS builder
WORKDIR /app
COPY go.mod go.sum ./
COPY static/ ./static/
COPY templates/ ./templates
RUN go mod download
COPY *.go ./
RUN CGO_ENABLED=0 GOOS=linux go build -o /abyss
FROM scratch
COPY --from=builder /abyss /abyss
COPY --from=builder /app/static /static
COPY --from=builder /app/templates /templates
CMD ["/abyss"]