File tree Expand file tree Collapse file tree 3 files changed +24
-36
lines changed Expand file tree Collapse file tree 3 files changed +24
-36
lines changed Original file line number Diff line number Diff line change 11# Build the autoinstrumenter binary
2- # TODO: replace by OTEL image once they are uploaded
32FROM ghcr.io/open-telemetry/obi-generator:0.1.1@sha256:3575058c6e7fa5346e62eef608f197802e8771f53bd2070e01751175c639c31d AS builder
43
54# TODO: embed software version in executable
Original file line number Diff line number Diff line change @@ -13,12 +13,35 @@ FROM base AS dist
1313WORKDIR /src
1414
1515ENV EBPF_VER=v0.19.0
16+ ENV PROTOC_VERSION=32.0
17+ ARG TARGETARCH
1618
17- RUN apk add clang llvm20 wget
19+ RUN apk add clang llvm20 wget unzip curl
1820RUN apk cache purge
21+
22+ # Install protoc
23+ # Deal with the arm64==aarch64 ambiguity
24+ RUN if [ "$TARGETARCH" = "arm64" ]; then \
25+ curl -qL https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-aarch_64.zip -o protoc.zip; \
26+ else \
27+ curl -qL https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip -o protoc.zip; \
28+ fi
29+ RUN unzip protoc.zip -d /usr/local
30+ RUN rm protoc.zip
31+
32+ # Install protoc-gen-go and protoc-gen-go-grpc
33+ RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
34+ RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
35+
36+ # Install eBPF tools
1937RUN go install github.com/cilium/ebpf/cmd/bpf2go@$EBPF_VER
2038COPY --from=builder /build/obi_genfiles /go/bin
2139
40+ # Verify installations
41+ RUN protoc --version
42+ RUN protoc-gen-go --version
43+ RUN protoc-gen-go-grpc --version
44+
2245RUN cat <<EOF > /generate.sh
2346# !/bin/sh
2447export GOCACHE=/tmp
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments