Skip to content

Commit

Permalink
Remove system-probe images entrypoint (#292)
Browse files Browse the repository at this point in the history
* sync comment

* install golang directly from download (without GIMME)

* remove sys-probe entrypoint

* fix go install

* cleanup go install

* fix

* fix omnibus image

* wget -> curl

* 2 spaces

* Revert omnibus changes

* Fix system probe go sha256

* update sha256 for go downloads

* cleanup `GIMME_GO_VERSION`
  • Loading branch information
paulcacheux authored Feb 2, 2023
1 parent c5447ff commit b404755
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 33 deletions.
26 changes: 9 additions & 17 deletions system-probe_arm64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
FROM debian:buster

ARG DEBIAN_FRONTEND=noninteractive
ARG GIMME_GO_VERSION=1.19.5
ARG GO_VERSION=1.19.5

ENV GIMME_GO_VERSION $GIMME_GO_VERSION
ENV GOPATH=/go

# We need up-to-date kernel headers to be able to use newly available eBPF helpers in programs
# We need up-to-date kernel headers to be able to use newly available eBPF helpers in programs.
RUN echo "deb http://deb.debian.org/debian buster-backports main" | tee -a /etc/apt/sources.list

RUN apt-get update && apt-get install -y --no-install-recommends apt-utils && apt-get dist-upgrade -y && apt-get install -y --no-install-recommends \
Expand Down Expand Up @@ -50,16 +47,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends apt-utils && ap
wget \
xz-utils

RUN wget -O /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/v1.5.4/gimme
RUN echo "03b295636d4e22870b6f6e9bc06a71d65311ae90d3d48cbc7071f82dd5837fbc /bin/gimme" | sha256sum --check
RUN chmod +x /bin/gimme
RUN gimme $GIMME_GO_VERSION
ENV GO_VERSION $GO_VERSION
ENV GOPATH=/go

RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-arm64.tar.gz \
&& echo "fc0aa29c933cec8d76f5435d859aaf42249aa08c74eb2d154689ae44c08d23b3 /tmp/golang.tar.gz" | sha256sum --check \
&& tar -C /usr/local -xzf /tmp/golang.tar.gz \
&& rm -f /tmp/golang.tar.gz
ENV PATH "/usr/local/go/bin:${PATH}"
ENV PATH "${GOPATH}/bin:${PATH}"

# create the agent build folder within $GOPATH
RUN mkdir -p $GOPATH/src/github.com/DataDog/datadog-agent

# install clang from the website since the package manager can change at any time
RUN wget "https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.1/clang+llvm-12.0.1-aarch64-linux-gnu.tar.xz" -O /tmp/clang.tar.xz -o /dev/null
RUN echo "3d4ad804b7c85007686548cbc917ab067bf17eaedeab43d9eb83d3a683d8e9d4 /tmp/clang.tar.xz" | sha256sum --check
Expand All @@ -70,8 +67,3 @@ ENV PATH "/opt/clang/bin:${PATH}"
COPY ./requirements.txt /
RUN python3 -m pip install wheel
RUN python3 -m pip install -r requirements.txt

COPY ./entrypoint-sysprobe.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
24 changes: 8 additions & 16 deletions system-probe_x64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
FROM debian:buster

ARG DEBIAN_FRONTEND=noninteractive
ARG GIMME_GO_VERSION=1.19.5

ENV GIMME_GO_VERSION $GIMME_GO_VERSION
ENV GOPATH=/go
ARG GO_VERSION=1.19.5

# We need up-to-date kernel headers to be able to use newly available eBPF helpers in programs.
RUN echo "deb http://deb.debian.org/debian buster-backports main" | tee -a /etc/apt/sources.list
Expand Down Expand Up @@ -51,16 +48,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends apt-utils && ap
wget \
xz-utils

RUN wget -O /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/v1.5.4/gimme
RUN echo "03b295636d4e22870b6f6e9bc06a71d65311ae90d3d48cbc7071f82dd5837fbc /bin/gimme" | sha256sum --check
RUN chmod +x /bin/gimme
RUN gimme $GIMME_GO_VERSION
ENV GO_VERSION $GO_VERSION
ENV GOPATH=/go

RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz \
&& echo "36519702ae2fd573c9869461990ae550c8c0d955cd28d2827a6b159fda81ff95 /tmp/golang.tar.gz" | sha256sum --check \
&& tar -C /usr/local -xzf /tmp/golang.tar.gz \
&& rm -f /tmp/golang.tar.gz
ENV PATH "/usr/local/go/bin:${PATH}"
ENV PATH "${GOPATH}/bin:${PATH}"

# create the agent build folder within $GOPATH
RUN mkdir -p $GOPATH/src/github.com/DataDog/datadog-agent

# install clang from the website since the package manager can change at any time
RUN wget "https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.1/clang+llvm-12.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz" -O /tmp/clang.tar.xz -o /dev/null
RUN echo "6b3cc55d3ef413be79785c4dc02828ab3bd6b887872b143e3091692fc6acefe7 /tmp/clang.tar.xz" | sha256sum --check
Expand All @@ -71,8 +68,3 @@ ENV PATH "/opt/clang/bin:${PATH}"
COPY ./requirements.txt /
RUN python3 -m pip install wheel
RUN python3 -m pip install -r requirements.txt

COPY ./entrypoint-sysprobe.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]

0 comments on commit b404755

Please sign in to comment.