From cef60447ca74aba0296ab767cc475a73c210dc65 Mon Sep 17 00:00:00 2001 From: Admin Date: Mon, 21 Sep 2026 01:30:56 +0000 Subject: [PATCH] Add multiplayer server Dockerfile --- server/Dockerfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 server/Dockerfile diff --git a/server/Dockerfile b/server/Dockerfile new file mode 100644 index 0000000..5a94a94 --- /dev/null +++ b/server/Dockerfile @@ -0,0 +1,14 @@ +FROM golang:1.23-alpine AS build +WORKDIR /src +COPY go.mod ./ +RUN go mod download +COPY . . +RUN CGO_ENABLED=0 GOOS=linux go test ./... && go build -trimpath -ldflags='-s -w' -o /out/airship-server . + +FROM alpine:3.21 +RUN apk add --no-cache ca-certificates +WORKDIR /app +COPY --from=build /out/airship-server /app/airship-server +EXPOSE 8080 +HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=5 CMD wget -qO- http://127.0.0.1:8080/health >/dev/null || exit 1 +ENTRYPOINT ["/app/airship-server"]