diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8235bd5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM golang:1.22 AS build +WORKDIR /src +COPY go.mod go.sum ./ +RUN go mod download +COPY . . +RUN CGO_ENABLED=0 go build -o /p . + +FROM scratch +COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ +COPY --from=build /p /p +COPY static /static +ENTRYPOINT ["/p"]