mirror of
https://github.com/ddworken/hishtory.git
synced 2025-01-22 22:28:51 +01:00
12 lines
361 B
Plaintext
12 lines
361 B
Plaintext
FROM golang:1.18 AS builder
|
|
COPY go.mod ./
|
|
COPY go.sum ./
|
|
RUN unset GOPATH; go mod download
|
|
COPY . ./
|
|
RUN unset GOPATH; go build -o /server -ldflags "-X main.ReleaseVersion=v0.`cat VERSION`" backend/server/server.go
|
|
|
|
FROM golang:1.18
|
|
COPY --from=builder /server /server
|
|
# TODO: use wait-for-it.sh instead of a janky sleep
|
|
CMD ["sh", "-c", "sleep 5; /server"]
|