chore: initial import
This commit is contained in:
16
Dockerfile
Normal file
16
Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
||||
# 多阶段构建
|
||||
FROM golang:1.22-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 go build -buildvcs=false -o ai-ops ./cmd/ai-ops
|
||||
|
||||
# 运行阶段
|
||||
FROM alpine:3.19
|
||||
RUN apk --no-cache add ca-certificates tzdata
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/ai-ops .
|
||||
COPY config.yaml .
|
||||
EXPOSE 8080
|
||||
CMD ["./ai-ops"]
|
||||
Reference in New Issue
Block a user