Skip to content

Commit

Permalink
Cache odiglet base image (#762)
Browse files Browse the repository at this point in the history
This PR speeds up the build time for the Odiglet component by using a
base Docker image that contains all the needed dependencies.
  • Loading branch information
edeNFed authored Nov 14, 2023
1 parent e928e15 commit b445d94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 1 addition & 5 deletions odiglet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ ARG DOTNET_OTEL_VERSION=v0.7.0
ADD https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/download/$DOTNET_OTEL_VERSION/opentelemetry-dotnet-instrumentation-linux-musl.zip .
RUN unzip opentelemetry-dotnet-instrumentation-linux-musl.zip && rm opentelemetry-dotnet-instrumentation-linux-musl.zip

FROM fedora:38 as builder
ARG TARGETARCH
RUN dnf install clang llvm make libbpf-devel -y
RUN curl -LO https://go.dev/dl/go1.21.0.linux-${TARGETARCH}.tar.gz && tar -C /usr/local -xzf go*.linux-${TARGETARCH}.tar.gz
ENV PATH="/usr/local/go/bin:${PATH}"
FROM keyval/odiglet-base:v1.0 as builder
WORKDIR /go/src/github.com/keyval-dev/odigos
COPY . .
WORKDIR ./odiglet/
Expand Down
5 changes: 5 additions & 0 deletions odiglet/base.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM fedora:38 as builder
ARG TARGETARCH
RUN dnf install clang llvm make libbpf-devel -y
RUN curl -LO https://go.dev/dl/go1.21.0.linux-${TARGETARCH}.tar.gz && tar -C /usr/local -xzf go*.linux-${TARGETARCH}.tar.gz
ENV PATH="/usr/local/go/bin:${PATH}"

0 comments on commit b445d94

Please sign in to comment.