10
0
goredirect/Dockerfile
rasmus 3bc9b283b3
Some checks failed
ci/woodpecker/manual/woodpecker Pipeline failed
Update to 1.23
2024-09-13 21:53:57 +03:00

12 lines
293 B
Docker

FROM golang:1.23 AS build
WORKDIR /go/src/git.k-space.ee/k-space/goredirect
COPY go.mod go.sum ./
RUN go mod download
COPY main.go .
RUN go build -ldflags "-linkmode 'external' -extldflags '-static'" -o /go/server .
FROM scratch
WORKDIR /
COPY --from=build /go/server /server
CMD ["/server"]