Files
kuberay/historyserver/Dockerfile.collector
Chia-Yi LiangandGitHub d916db072c [History Sever] Use compression library in collector and historyserver (#4899)
* Use compression library in collector and historyserver

* Update test for compression library
2026-06-18 17:09:51 -04:00

33 lines
987 B
Docker

FROM golang:1.26-bookworm AS builder
ARG GOPROXY=https://proxy.golang.org,direct
ARG ENABLE_RACE=false
ENV GOPROXY=${GOPROXY}
WORKDIR /historyserver
# Copy the go modules and manifests.
COPY go.mod go.mod
COPY go.sum go.sum
# Cache dependencies to avoid re-downloading when only sources change.
RUN go mod download
# Copy the go source.
COPY cmd/collector/main.go cmd/collector/main.go
COPY pkg/collector/ pkg/collector/
COPY pkg/storage/ pkg/storage/
COPY pkg/utils/ pkg/utils/
COPY pkg/eventserver/ pkg/eventserver/
COPY pkg/compression/ pkg/compression/
# Build the collector binary.
COPY Makefile Makefile
RUN if [ "$ENABLE_RACE" = "true" ]; then \
make buildcollector-race GOOS=linux GOARCH=amd64; \
else \
make buildcollector GOOS=linux GOARCH=amd64; \
fi
FROM ubuntu:22.04
RUN apt-get update && apt-get upgrade -y && rm -rf /var/cache/apt/ && apt-get install -y ca-certificates
COPY --from=builder /historyserver/output/bin/collector /usr/local/bin/collector