10
0
goredirect/Dockerfile

12 lines
293 B
Docker
Raw Normal View History

2024-09-13 18:52:46 +00:00
FROM golang:1.23 AS build
2023-08-04 02:58:13 +00:00
WORKDIR /go/src/git.k-space.ee/k-space/goredirect
2022-02-09 04:38:54 +00:00
COPY go.mod go.sum ./
2021-05-25 20:28:00 +00:00
RUN go mod download
COPY main.go .
2023-08-04 02:58:13 +00:00
RUN go build -ldflags "-linkmode 'external' -extldflags '-static'" -o /go/server .
FROM scratch
WORKDIR /
COPY --from=build /go/server /server
CMD ["/server"]