ToyBoomServer/Dockerfile.standalone
2024-09-02 18:07:30 +00:00

12 lines
333 B
Docker

FROM golang:1.22 AS builder
WORKDIR $GOPATH/src/toyboom-server
COPY . .
RUN mkdir /app && \
CGO_ENABLED=1 GOPROXY=https://goproxy.cn,direct go build -o toyboom-server main.go && \
cp toyboom-server /app/
FROM golang:1.22
COPY --from=builder /app/toyboom-server /app/toyboom-server
EXPOSE 8080
ENTRYPOINT [ "/app/toyboom-server" ]