abyss/Dockerfile
jabuxas 5c951b3a6d build: remove unecessary files in final image
These aren't needed anymore because we started embedding `static` and
`templates` directly into the binary, so that makes it easier to:

1. Distribute
2. Setup
3. Run
2024-10-18 11:26:43 -03:00

22 lines
328 B
Docker

FROM golang:1.23 AS builder
WORKDIR /app
COPY go.mod go.sum ./
# this is needed because we embed these files into the binary
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
CMD ["/abyss"]