Files

13 lines
292 B
Docker

FROM golang:1.23-alpine AS build
WORKDIR /src
COPY go.mod ./
COPY server ./server
COPY web ./web
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/game ./server
FROM gcr.io/distroless/static
COPY --from=build /out/game /game
ENV MUSIC_DIR=/music
EXPOSE 8080
ENTRYPOINT ["/game"]