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 1
1
# Build the autoinstrumenter binary
2
- # TODO: replace by OTEL image once they are uploaded
3
2
FROM ghcr.io/open-telemetry/obi-generator:0.1.1@sha256:3575058c6e7fa5346e62eef608f197802e8771f53bd2070e01751175c639c31d AS builder
4
3
5
4
# TODO: embed software version in executable
Original file line number Diff line number Diff line change @@ -13,12 +13,35 @@ FROM base AS dist
13
13
WORKDIR /src
14
14
15
15
ENV EBPF_VER=v0.19.0
16
+ ENV PROTOC_VERSION=32.0
17
+ ARG TARGETARCH
16
18
17
- RUN apk add clang llvm20 wget
19
+ RUN apk add clang llvm20 wget unzip curl
18
20
RUN 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
19
37
RUN go install github.com/cilium/ebpf/cmd/bpf2go@$EBPF_VER
20
38
COPY --from=builder /build/obi_genfiles /go/bin
21
39
40
+ # Verify installations
41
+ RUN protoc --version
42
+ RUN protoc-gen-go --version
43
+ RUN protoc-gen-go-grpc --version
44
+
22
45
RUN cat <<EOF > /generate.sh
23
46
# !/bin/sh
24
47
export GOCACHE=/tmp
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments