精简项目:只保留 docker_logs + health + info 三个工具

- 移除 database/middleware 等复杂模块,先聚焦核心功能
- docker_logs:封装 docker logs --tail N <container>
- 修复 go.mod 版本为 1.24 匹配 Docker 构建镜像
- Dockerfile 改用 alpine + docker-cli,避免 scratch 无 shell 问题
- docker-compose.yml 简化为单服务定义

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
yangzhaohan
2026-07-06 10:42:23 +08:00
parent fb2c3a6cae
commit 093511bbdd
23 changed files with 144 additions and 1352 deletions
+4 -5
View File
@@ -6,15 +6,14 @@ COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /server ./cmd/server
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /server ./cmd/server
FROM scratch
FROM alpine:3.21
RUN apk add --no-cache docker-cli ca-certificates
COPY --from=builder /server /server
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY config/ /config/
EXPOSE 8080
USER 65534
ENTRYPOINT ["/server"]