初始化斗地主残局版项目
This commit is contained in:
15
app/Dockerfile
Normal file
15
app/Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
FROM golang:1.21-alpine AS builder
|
||||
ENV GOPROXY=https://goproxy.cn,direct
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
WORKDIR /app/cmd
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o /server .
|
||||
|
||||
FROM alpine:3.18
|
||||
RUN apk --no-cache add ca-certificates tzdata
|
||||
WORKDIR /app
|
||||
COPY --from=builder /server .
|
||||
EXPOSE 8080
|
||||
CMD ["./server"]
|
||||
Reference in New Issue
Block a user