hishtory/backend/server/Dockerfile

11 lines
301 B
Docker
Raw Normal View History

2022-09-21 08:27:36 +02:00
FROM golang:1.18 AS builder
COPY go.mod ./
COPY go.sum ./
RUN unset GOPATH; go mod download
COPY . ./
RUN unset GOPATH; GOARCH=amd64 go build -o /server -ldflags "-X main.ReleaseVersion=v0.`cat VERSION`" backend/server/server.go
2022-09-04 06:28:47 +02:00
FROM golang:1.18
COPY --from=builder /server /server
CMD ["/server"]