Add multiplayer server Dockerfile
This commit is contained in:
parent
1d6c34ef4b
commit
cef60447ca
14
server/Dockerfile
Normal file
14
server/Dockerfile
Normal file
@ -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"]
|
||||||
Loading…
x
Reference in New Issue
Block a user