refactor(srv): 内置 -healthcheck 参数并移除独立 healthcheck 二进制
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
1 parent
57fd444c29
commit
ba9d7d83fe
4 files changed
+72
-41
No files matched your search
@@ -11,15 +11,13 @@ RUN --mount=type=ssh,required=true \
|
||||
--mount=type=secret,id=git_known_hosts,target=/root/.ssh/known_hosts,required=true \
|
||||
go mod download
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 go build -mod=readonly -trimpath -o /out/srv ./cmd/srv \
|
||||
&& CGO_ENABLED=0 go build -mod=readonly -trimpath -o /out/grpc-health ./cmd/healthcheck
|
||||
RUN CGO_ENABLED=0 go build -mod=readonly -trimpath -o /out/srv ./cmd/srv
|
||||
|
||||
FROM harbor.vitatech.com.cn:19443/vitavideo/base-alpine:3.23
|
||||
RUN apk add --no-cache ca-certificates tzdata
|
||||
WORKDIR /app
|
||||
RUN mkdir -p logs && chown 65532:65532 logs
|
||||
COPY --from=builder /out/srv ./srv
|
||||
COPY --from=builder /out/grpc-health ./grpc-health
|
||||
USER 65532:65532
|
||||
EXPOSE 50112
|
||||
ENTRYPOINT ["./srv"]
|
||||
Reference in new issue
Block a user