10
0
goredirect/Dockerfile
Lauri Võsandi 669e644dc3
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
Update build
2023-08-04 05:58:13 +03:00

12 lines
293 B
Docker

FROM golang:1.20 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"]