aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
blob: f5b2af69cbdaf74185d34752a7f2f5ecee50d799 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
FROM golang:1.22 AS builder

WORKDIR /app
COPY . .

RUN CGO_ENABLED=0 go build -ldflags "-X main.version=$(git describe --exact-match --tags)" -o /app/server cmd/mobius-hotline-server/main.go && chmod a+x /app/server

FROM scratch

COPY --from=builder /app/server /app/server
COPY --from=builder /app/cmd/mobius-hotline-server/mobius/config /usr/local/var/mobius/config

EXPOSE 5500 5501

ENTRYPOINT ["/app/server"]