初始提交
This commit is contained in:
16
Dockerfile
Normal file
16
Dockerfile
Normal file
@ -0,0 +1,16 @@
|
||||
FROM golang:1.25.5-alpine3.23 AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o app .
|
||||
|
||||
FROM alpine:3.23
|
||||
|
||||
WORKDIR /root/
|
||||
COPY --from=builder /app/app .
|
||||
CMD ["./app"]
|
||||
|
||||
Reference in New Issue
Block a user