Files
hunjing/docker/Dockerfile.web-search
2026-08-21 16:00:13 +08:00

25 lines
588 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 博闻(Bowen)MCP Web Search 多阶段构建
# 独立于其他服务的 Dockerfile,通过 docker-compose.app.yml 编排
# ---- 构建阶段 ----
FROM golang:1.22-alpine AS builder
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o /bin/bowen-server ./cmd/server
# ---- 运行阶段 ----
FROM alpine:3.19
RUN apk add --no-cache ca-certificates tzdata
COPY --from=builder /bin/bowen-server /usr/local/bin/bowen-server
EXPOSE 8080 9090
ENTRYPOINT ["/usr/local/bin/bowen-server"]
CMD ["--config", "/etc/bowen/config.yaml"]