abyss/Dockerfile

23 lines
333 B
Docker

FROM golang:1.23 AS builder
WORKDIR /app
COPY go.mod go.sum ./
COPY go.mod ./
COPY static ./
COPY 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 /
COPY --from=builder /app/templates /
CMD ["/abyss"]