Added Dockerfile

This commit is contained in:
Leon Mika 2025-02-01 11:04:32 +11:00
parent 50f7e9632e
commit 1b67fe284d
4 changed files with 33 additions and 10 deletions

21
Dockerfile Normal file
View file

@ -0,0 +1,21 @@
FROM golang:1.23.3 AS builder
WORKDIR /usr/src/app
COPY go.mod go.sum ./
RUN go mod download && go mod verify
COPY . .
RUN make compile
FROM scratch
COPY --from=builder /usr/src/app/build/ /.
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
WORKDIR /
ENV PORT=3000
CMD ["/hugo-cms"]