From 86f74ce64c42ed03e34aa863bc1db765cb4fc18c Mon Sep 17 00:00:00 2001 From: Paul Cacheux Date: Sat, 1 Oct 2022 18:49:27 +0200 Subject: [PATCH 01/13] sync comment --- system-probe_arm64/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-probe_arm64/Dockerfile b/system-probe_arm64/Dockerfile index 376a4ed10..61cccf29e 100644 --- a/system-probe_arm64/Dockerfile +++ b/system-probe_arm64/Dockerfile @@ -6,7 +6,7 @@ ARG GIMME_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 \ From 48f78108d03692af1a3a2736ab35167af428902a Mon Sep 17 00:00:00 2001 From: Paul Cacheux Date: Sat, 1 Oct 2022 18:59:40 +0200 Subject: [PATCH 02/13] install golang directly from download (without GIMME) --- system-probe_arm64/Dockerfile | 15 +++++---------- system-probe_x64/Dockerfile | 15 +++++---------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/system-probe_arm64/Dockerfile b/system-probe_arm64/Dockerfile index 61cccf29e..24088ed2b 100644 --- a/system-probe_arm64/Dockerfile +++ b/system-probe_arm64/Dockerfile @@ -3,9 +3,6 @@ FROM debian:buster ARG DEBIAN_FRONTEND=noninteractive ARG GIMME_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. RUN echo "deb http://deb.debian.org/debian buster-backports main" | tee -a /etc/apt/sources.list @@ -50,16 +47,14 @@ 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 $GIMME_GO_VERSION +ENV GOPATH=/usr/local/go +RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go1.18.6.linux-arm64.tar.gz +RUN echo "838ffa94158125f16e4aa667ee4f6b499ea57e3e35a7e2517ad357ea06714691 /tmp/golang.tar.gz" | sha256sum --check +RUN tar -C /usr/local -xzf /tmp/golang.tar.gz 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 diff --git a/system-probe_x64/Dockerfile b/system-probe_x64/Dockerfile index 1c49828a8..e501ea9aa 100644 --- a/system-probe_x64/Dockerfile +++ b/system-probe_x64/Dockerfile @@ -3,9 +3,6 @@ FROM debian:buster ARG DEBIAN_FRONTEND=noninteractive ARG GIMME_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. RUN echo "deb http://deb.debian.org/debian buster-backports main" | tee -a /etc/apt/sources.list @@ -51,16 +48,14 @@ 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 $GIMME_GO_VERSION +ENV GOPATH=/usr/local/go +RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go1.18.6.linux-amd64.tar.gz +RUN echo "bb05f179a773fed60c6a454a24141aaa7e71edfd0f2d465ad610a3b8f1dc7fe8 /tmp/golang.tar.gz" | sha256sum --check +RUN tar -C /usr/local -xzf /tmp/golang.tar.gz 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 From 35d93085784089ee0690efcf1ae8df95b929055c Mon Sep 17 00:00:00 2001 From: Paul Cacheux Date: Sat, 1 Oct 2022 19:00:29 +0200 Subject: [PATCH 03/13] remove sys-probe entrypoint --- entrypoint-sysprobe.sh | 6 ------ system-probe_arm64/Dockerfile | 5 ----- system-probe_x64/Dockerfile | 5 ----- 3 files changed, 16 deletions(-) delete mode 100644 entrypoint-sysprobe.sh diff --git a/entrypoint-sysprobe.sh b/entrypoint-sysprobe.sh deleted file mode 100644 index def68cbfc..000000000 --- a/entrypoint-sysprobe.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -set -e - -eval "$(gimme)" - -exec "$@" diff --git a/system-probe_arm64/Dockerfile b/system-probe_arm64/Dockerfile index 24088ed2b..35ecc0234 100644 --- a/system-probe_arm64/Dockerfile +++ b/system-probe_arm64/Dockerfile @@ -65,8 +65,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"] diff --git a/system-probe_x64/Dockerfile b/system-probe_x64/Dockerfile index e501ea9aa..f6be7d727 100644 --- a/system-probe_x64/Dockerfile +++ b/system-probe_x64/Dockerfile @@ -66,8 +66,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"] From 278f4e1616e7c51063d6b8a1f02a94b62dd2dfa1 Mon Sep 17 00:00:00 2001 From: Paul Cacheux Date: Sat, 1 Oct 2022 19:09:20 +0200 Subject: [PATCH 04/13] fix go install --- system-probe_arm64/Dockerfile | 5 +++-- system-probe_x64/Dockerfile | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/system-probe_arm64/Dockerfile b/system-probe_arm64/Dockerfile index 35ecc0234..60b4032a4 100644 --- a/system-probe_arm64/Dockerfile +++ b/system-probe_arm64/Dockerfile @@ -48,11 +48,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends apt-utils && ap xz-utils ENV GO_VERSION $GIMME_GO_VERSION -ENV GOPATH=/usr/local/go +ENV GOPATH=/go -RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go1.18.6.linux-arm64.tar.gz +RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-arm64.tar.gz RUN echo "838ffa94158125f16e4aa667ee4f6b499ea57e3e35a7e2517ad357ea06714691 /tmp/golang.tar.gz" | sha256sum --check RUN tar -C /usr/local -xzf /tmp/golang.tar.gz +ENV PATH "/usr/local/go/bin:${PATH}" ENV PATH "${GOPATH}/bin:${PATH}" # install clang from the website since the package manager can change at any time diff --git a/system-probe_x64/Dockerfile b/system-probe_x64/Dockerfile index f6be7d727..3cb7a58d7 100644 --- a/system-probe_x64/Dockerfile +++ b/system-probe_x64/Dockerfile @@ -49,11 +49,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends apt-utils && ap xz-utils ENV GO_VERSION $GIMME_GO_VERSION -ENV GOPATH=/usr/local/go +ENV GOPATH=/go -RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go1.18.6.linux-amd64.tar.gz +RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz RUN echo "bb05f179a773fed60c6a454a24141aaa7e71edfd0f2d465ad610a3b8f1dc7fe8 /tmp/golang.tar.gz" | sha256sum --check RUN tar -C /usr/local -xzf /tmp/golang.tar.gz +ENV PATH "/usr/local/go/bin:${PATH}" ENV PATH "${GOPATH}/bin:${PATH}" # install clang from the website since the package manager can change at any time From c20d4dfaaf6eb92444fb2c22ce9b9051f36d1a88 Mon Sep 17 00:00:00 2001 From: Paul Cacheux Date: Sat, 1 Oct 2022 19:17:59 +0200 Subject: [PATCH 05/13] cleanup go install --- system-probe_arm64/Dockerfile | 7 ++++--- system-probe_x64/Dockerfile | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/system-probe_arm64/Dockerfile b/system-probe_arm64/Dockerfile index 60b4032a4..3791d289e 100644 --- a/system-probe_arm64/Dockerfile +++ b/system-probe_arm64/Dockerfile @@ -50,9 +50,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends apt-utils && ap ENV GO_VERSION $GIMME_GO_VERSION ENV GOPATH=/go -RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-arm64.tar.gz -RUN echo "838ffa94158125f16e4aa667ee4f6b499ea57e3e35a7e2517ad357ea06714691 /tmp/golang.tar.gz" | sha256sum --check -RUN tar -C /usr/local -xzf /tmp/golang.tar.gz +RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-arm64.tar.gz \ + && echo "838ffa94158125f16e4aa667ee4f6b499ea57e3e35a7e2517ad357ea06714691 /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}" diff --git a/system-probe_x64/Dockerfile b/system-probe_x64/Dockerfile index 3cb7a58d7..93fe5bed1 100644 --- a/system-probe_x64/Dockerfile +++ b/system-probe_x64/Dockerfile @@ -51,9 +51,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends apt-utils && ap ENV GO_VERSION $GIMME_GO_VERSION ENV GOPATH=/go -RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz -RUN echo "bb05f179a773fed60c6a454a24141aaa7e71edfd0f2d465ad610a3b8f1dc7fe8 /tmp/golang.tar.gz" | sha256sum --check -RUN tar -C /usr/local -xzf /tmp/golang.tar.gz +RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-arm64.tar.gz \ + && echo "838ffa94158125f16e4aa667ee4f6b499ea57e3e35a7e2517ad357ea06714691 /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}" From 36f664251b8568c80f1523f11822608aa07e49f3 Mon Sep 17 00:00:00 2001 From: Paul Cacheux Date: Mon, 3 Oct 2022 10:08:13 +0200 Subject: [PATCH 06/13] fix --- system-probe_x64/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system-probe_x64/Dockerfile b/system-probe_x64/Dockerfile index 93fe5bed1..074adf0ee 100644 --- a/system-probe_x64/Dockerfile +++ b/system-probe_x64/Dockerfile @@ -51,8 +51,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends apt-utils && ap ENV GO_VERSION $GIMME_GO_VERSION ENV GOPATH=/go -RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-arm64.tar.gz \ - && echo "838ffa94158125f16e4aa667ee4f6b499ea57e3e35a7e2517ad357ea06714691 /tmp/golang.tar.gz" | sha256sum --check \ +RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz \ + && echo "bb05f179a773fed60c6a454a24141aaa7e71edfd0f2d465ad610a3b8f1dc7fe8 /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}" From 92522c5c8189949ffdb4ed604618cc3af76afc74 Mon Sep 17 00:00:00 2001 From: Paul Cacheux Date: Mon, 3 Oct 2022 10:09:10 +0200 Subject: [PATCH 07/13] fix omnibus image --- omnibus-nikos_arm64/Dockerfile | 20 ++++++++------------ omnibus-nikos_x64/Dockerfile | 20 ++++++++------------ 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/omnibus-nikos_arm64/Dockerfile b/omnibus-nikos_arm64/Dockerfile index 9c0d7110e..9aefe3fb8 100644 --- a/omnibus-nikos_arm64/Dockerfile +++ b/omnibus-nikos_arm64/Dockerfile @@ -20,7 +20,7 @@ ARG CLANG_SHA256="a77eb8fde0a475c25d46dccdeb851a83cbeeeb11779fa2218ae19db9cd0e51 # Environment ENV GOPATH /go -ENV GIMME_GO_VERSION $GIMME_GO_VERSION +ENV GO_VERSION $GIMME_GO_VERSION ENV CMAKE_VERSION $CMAKE_VERSION ENV CMAKE_SHA256 $CMAKE_SHA256 ENV CLANG_VERSION $CLANG_VERSION @@ -75,12 +75,13 @@ RUN curl -sL -o clang_llvm.tar.xz https://dd-agent-omnibus.s3.amazonaws.com/clan && rm clang_llvm.tar.xz ENV PATH="/opt/clang/bin:$PATH" -# Gimme -RUN curl -sL -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 -COPY ./gobin.sh /etc/profile.d/ +# Install go +RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-arm64.tar.gz \ + && echo "838ffa94158125f16e4aa667ee4f6b499ea57e3e35a7e2517ad357ea06714691 /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}" # Automake RUN curl -OL https://ftp.gnu.org/gnu/automake/automake-1.16.tar.gz @@ -90,8 +91,3 @@ COPY ./omnibus-nikos_x64/automake.patch automake-1.16/automake.patch RUN cd automake-1.16 && patch -p1 < automake.patch RUN cd automake-1.16 && ./bootstrap && ./configure --prefix=/usr/local && make -j 5 && make install RUN rm -rf automake-1.16 automake-1.16.tar.gz - -COPY ./entrypoint-sysprobe.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh - -ENTRYPOINT ["/entrypoint.sh"] diff --git a/omnibus-nikos_x64/Dockerfile b/omnibus-nikos_x64/Dockerfile index 25876c11c..950ae9283 100644 --- a/omnibus-nikos_x64/Dockerfile +++ b/omnibus-nikos_x64/Dockerfile @@ -22,7 +22,7 @@ ARG CONDA_SHA256="536817d1b14cb1ada88900f5be51ce0a5e042bae178b5550e62f61e223deae # Environment ENV GOPATH /go ENV CONDA_PATH /root/miniconda3 -ENV GIMME_GO_VERSION $GIMME_GO_VERSION +ENV GO_VERSION $GIMME_GO_VERSION ENV CMAKE_VERSION $CMAKE_VERSION ENV CMAKE_SHA256 $CMAKE_SHA256 ENV CLANG_VERSION $CLANG_VERSION @@ -127,12 +127,13 @@ RUN curl -LO https://ftp.gnu.org/gnu/glibc/glibc-2.16.0.tar.gz \ && make -j 8 \ && make install -# Gimme -RUN curl -sL -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 -COPY ./gobin.sh /etc/profile.d/ +# Install go +RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz \ + && echo "bb05f179a773fed60c6a454a24141aaa7e71edfd0f2d465ad610a3b8f1dc7fe8 /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}" # Automake RUN curl -OL https://ftp.gnu.org/gnu/automake/automake-1.16.tar.gz @@ -143,8 +144,3 @@ COPY ./omnibus-nikos_x64/automake.patch automake-1.16/automake.patch RUN cd automake-1.16 && patch -p1 < automake.patch RUN cd automake-1.16 && ./bootstrap && ./configure --prefix=/usr/local && make -j 5 && make install RUN rm -rf automake-1.16 automake-1.16.tar.gz - -COPY ./entrypoint-sysprobe.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh - -ENTRYPOINT ["/entrypoint.sh"] From f1eb587ed93f2e4a30b2885bd92d10945c7a5785 Mon Sep 17 00:00:00 2001 From: Paul Cacheux Date: Mon, 3 Oct 2022 10:22:03 +0200 Subject: [PATCH 08/13] wget -> curl --- omnibus-nikos_arm64/Dockerfile | 2 +- omnibus-nikos_x64/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/omnibus-nikos_arm64/Dockerfile b/omnibus-nikos_arm64/Dockerfile index 9aefe3fb8..5f318ef0d 100644 --- a/omnibus-nikos_arm64/Dockerfile +++ b/omnibus-nikos_arm64/Dockerfile @@ -76,7 +76,7 @@ RUN curl -sL -o clang_llvm.tar.xz https://dd-agent-omnibus.s3.amazonaws.com/clan ENV PATH="/opt/clang/bin:$PATH" # Install go -RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-arm64.tar.gz \ +RUN curl -sSL -o /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-arm64.tar.gz \ && echo "838ffa94158125f16e4aa667ee4f6b499ea57e3e35a7e2517ad357ea06714691 /tmp/golang.tar.gz" | sha256sum --check \ && tar -C /usr/local -xzf /tmp/golang.tar.gz \ && rm -f /tmp/golang.tar.gz diff --git a/omnibus-nikos_x64/Dockerfile b/omnibus-nikos_x64/Dockerfile index 950ae9283..4bb81bf4d 100644 --- a/omnibus-nikos_x64/Dockerfile +++ b/omnibus-nikos_x64/Dockerfile @@ -128,7 +128,7 @@ RUN curl -LO https://ftp.gnu.org/gnu/glibc/glibc-2.16.0.tar.gz \ && make install # Install go -RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz \ +RUN curl -sSL -o /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz \ && echo "bb05f179a773fed60c6a454a24141aaa7e71edfd0f2d465ad610a3b8f1dc7fe8 /tmp/golang.tar.gz" | sha256sum --check \ && tar -C /usr/local -xzf /tmp/golang.tar.gz \ && rm -f /tmp/golang.tar.gz From 21d2503762148e560b0e96a06b03452200f3efd8 Mon Sep 17 00:00:00 2001 From: Paul Cacheux Date: Mon, 3 Oct 2022 11:07:48 +0200 Subject: [PATCH 09/13] 2 spaces --- omnibus-nikos_arm64/Dockerfile | 2 +- omnibus-nikos_x64/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/omnibus-nikos_arm64/Dockerfile b/omnibus-nikos_arm64/Dockerfile index 5f318ef0d..38283555a 100644 --- a/omnibus-nikos_arm64/Dockerfile +++ b/omnibus-nikos_arm64/Dockerfile @@ -77,7 +77,7 @@ ENV PATH="/opt/clang/bin:$PATH" # Install go RUN curl -sSL -o /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-arm64.tar.gz \ - && echo "838ffa94158125f16e4aa667ee4f6b499ea57e3e35a7e2517ad357ea06714691 /tmp/golang.tar.gz" | sha256sum --check \ + && echo "838ffa94158125f16e4aa667ee4f6b499ea57e3e35a7e2517ad357ea06714691 /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}" diff --git a/omnibus-nikos_x64/Dockerfile b/omnibus-nikos_x64/Dockerfile index 4bb81bf4d..e67916d56 100644 --- a/omnibus-nikos_x64/Dockerfile +++ b/omnibus-nikos_x64/Dockerfile @@ -129,7 +129,7 @@ RUN curl -LO https://ftp.gnu.org/gnu/glibc/glibc-2.16.0.tar.gz \ # Install go RUN curl -sSL -o /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz \ - && echo "bb05f179a773fed60c6a454a24141aaa7e71edfd0f2d465ad610a3b8f1dc7fe8 /tmp/golang.tar.gz" | sha256sum --check \ + && echo "bb05f179a773fed60c6a454a24141aaa7e71edfd0f2d465ad610a3b8f1dc7fe8 /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}" From b82fa5a5fbdbc7000a9ed55a823615db8dc97a5b Mon Sep 17 00:00:00 2001 From: Paul Cacheux Date: Wed, 30 Nov 2022 11:39:58 +0100 Subject: [PATCH 10/13] Revert omnibus changes --- entrypoint-sysprobe.sh | 6 ++++++ omnibus-nikos_arm64/Dockerfile | 20 ++++++++++++-------- omnibus-nikos_x64/Dockerfile | 20 ++++++++++++-------- 3 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 entrypoint-sysprobe.sh diff --git a/entrypoint-sysprobe.sh b/entrypoint-sysprobe.sh new file mode 100644 index 000000000..def68cbfc --- /dev/null +++ b/entrypoint-sysprobe.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +eval "$(gimme)" + +exec "$@" diff --git a/omnibus-nikos_arm64/Dockerfile b/omnibus-nikos_arm64/Dockerfile index 38283555a..9c0d7110e 100644 --- a/omnibus-nikos_arm64/Dockerfile +++ b/omnibus-nikos_arm64/Dockerfile @@ -20,7 +20,7 @@ ARG CLANG_SHA256="a77eb8fde0a475c25d46dccdeb851a83cbeeeb11779fa2218ae19db9cd0e51 # Environment ENV GOPATH /go -ENV GO_VERSION $GIMME_GO_VERSION +ENV GIMME_GO_VERSION $GIMME_GO_VERSION ENV CMAKE_VERSION $CMAKE_VERSION ENV CMAKE_SHA256 $CMAKE_SHA256 ENV CLANG_VERSION $CLANG_VERSION @@ -75,13 +75,12 @@ RUN curl -sL -o clang_llvm.tar.xz https://dd-agent-omnibus.s3.amazonaws.com/clan && rm clang_llvm.tar.xz ENV PATH="/opt/clang/bin:$PATH" -# Install go -RUN curl -sSL -o /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-arm64.tar.gz \ - && echo "838ffa94158125f16e4aa667ee4f6b499ea57e3e35a7e2517ad357ea06714691 /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}" +# Gimme +RUN curl -sL -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 +COPY ./gobin.sh /etc/profile.d/ # Automake RUN curl -OL https://ftp.gnu.org/gnu/automake/automake-1.16.tar.gz @@ -91,3 +90,8 @@ COPY ./omnibus-nikos_x64/automake.patch automake-1.16/automake.patch RUN cd automake-1.16 && patch -p1 < automake.patch RUN cd automake-1.16 && ./bootstrap && ./configure --prefix=/usr/local && make -j 5 && make install RUN rm -rf automake-1.16 automake-1.16.tar.gz + +COPY ./entrypoint-sysprobe.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/omnibus-nikos_x64/Dockerfile b/omnibus-nikos_x64/Dockerfile index e67916d56..25876c11c 100644 --- a/omnibus-nikos_x64/Dockerfile +++ b/omnibus-nikos_x64/Dockerfile @@ -22,7 +22,7 @@ ARG CONDA_SHA256="536817d1b14cb1ada88900f5be51ce0a5e042bae178b5550e62f61e223deae # Environment ENV GOPATH /go ENV CONDA_PATH /root/miniconda3 -ENV GO_VERSION $GIMME_GO_VERSION +ENV GIMME_GO_VERSION $GIMME_GO_VERSION ENV CMAKE_VERSION $CMAKE_VERSION ENV CMAKE_SHA256 $CMAKE_SHA256 ENV CLANG_VERSION $CLANG_VERSION @@ -127,13 +127,12 @@ RUN curl -LO https://ftp.gnu.org/gnu/glibc/glibc-2.16.0.tar.gz \ && make -j 8 \ && make install -# Install go -RUN curl -sSL -o /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz \ - && echo "bb05f179a773fed60c6a454a24141aaa7e71edfd0f2d465ad610a3b8f1dc7fe8 /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}" +# Gimme +RUN curl -sL -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 +COPY ./gobin.sh /etc/profile.d/ # Automake RUN curl -OL https://ftp.gnu.org/gnu/automake/automake-1.16.tar.gz @@ -144,3 +143,8 @@ COPY ./omnibus-nikos_x64/automake.patch automake-1.16/automake.patch RUN cd automake-1.16 && patch -p1 < automake.patch RUN cd automake-1.16 && ./bootstrap && ./configure --prefix=/usr/local && make -j 5 && make install RUN rm -rf automake-1.16 automake-1.16.tar.gz + +COPY ./entrypoint-sysprobe.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + +ENTRYPOINT ["/entrypoint.sh"] From f36eff197fd2e7fb2d78d1beb8ff9a8b486e1790 Mon Sep 17 00:00:00 2001 From: Paul Cacheux Date: Wed, 30 Nov 2022 11:40:14 +0100 Subject: [PATCH 11/13] Fix system probe go sha256 --- system-probe_arm64/Dockerfile | 2 +- system-probe_x64/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system-probe_arm64/Dockerfile b/system-probe_arm64/Dockerfile index 3791d289e..7299e06bf 100644 --- a/system-probe_arm64/Dockerfile +++ b/system-probe_arm64/Dockerfile @@ -51,7 +51,7 @@ ENV GO_VERSION $GIMME_GO_VERSION ENV GOPATH=/go RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-arm64.tar.gz \ - && echo "838ffa94158125f16e4aa667ee4f6b499ea57e3e35a7e2517ad357ea06714691 /tmp/golang.tar.gz" | sha256sum --check \ + && echo "df71bc84d84f7f62dad06aca5e1b8234045dce94a94dcefe71af0cb8f6e93a87 /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}" diff --git a/system-probe_x64/Dockerfile b/system-probe_x64/Dockerfile index 074adf0ee..9043483ce 100644 --- a/system-probe_x64/Dockerfile +++ b/system-probe_x64/Dockerfile @@ -52,7 +52,7 @@ ENV GO_VERSION $GIMME_GO_VERSION ENV GOPATH=/go RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz \ - && echo "bb05f179a773fed60c6a454a24141aaa7e71edfd0f2d465ad610a3b8f1dc7fe8 /tmp/golang.tar.gz" | sha256sum --check \ + && echo "4d854c7bad52d53470cf32f1b287a5c0c441dc6b98306dea27358e099698142a /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}" From 9bba6a30b16e32ad92e26c585473ab45bf113bbb Mon Sep 17 00:00:00 2001 From: Paul Cacheux Date: Thu, 26 Jan 2023 15:19:03 +0100 Subject: [PATCH 12/13] update sha256 for go downloads --- system-probe_arm64/Dockerfile | 2 +- system-probe_x64/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system-probe_arm64/Dockerfile b/system-probe_arm64/Dockerfile index 7299e06bf..d0109442c 100644 --- a/system-probe_arm64/Dockerfile +++ b/system-probe_arm64/Dockerfile @@ -51,7 +51,7 @@ ENV GO_VERSION $GIMME_GO_VERSION ENV GOPATH=/go RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-arm64.tar.gz \ - && echo "df71bc84d84f7f62dad06aca5e1b8234045dce94a94dcefe71af0cb8f6e93a87 /tmp/golang.tar.gz" | sha256sum --check \ + && 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}" diff --git a/system-probe_x64/Dockerfile b/system-probe_x64/Dockerfile index 9043483ce..ffb4c5065 100644 --- a/system-probe_x64/Dockerfile +++ b/system-probe_x64/Dockerfile @@ -52,7 +52,7 @@ ENV GO_VERSION $GIMME_GO_VERSION ENV GOPATH=/go RUN wget -O /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz \ - && echo "4d854c7bad52d53470cf32f1b287a5c0c441dc6b98306dea27358e099698142a /tmp/golang.tar.gz" | sha256sum --check \ + && 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}" From 2f100d0dce7eb1c2ff928b7b44c7f79ad60acad7 Mon Sep 17 00:00:00 2001 From: Paul Cacheux Date: Thu, 26 Jan 2023 21:45:49 +0100 Subject: [PATCH 13/13] cleanup `GIMME_GO_VERSION` --- system-probe_arm64/Dockerfile | 4 ++-- system-probe_x64/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/system-probe_arm64/Dockerfile b/system-probe_arm64/Dockerfile index d0109442c..05071c183 100644 --- a/system-probe_arm64/Dockerfile +++ b/system-probe_arm64/Dockerfile @@ -1,7 +1,7 @@ FROM debian:buster ARG DEBIAN_FRONTEND=noninteractive -ARG GIMME_GO_VERSION=1.19.5 +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 @@ -47,7 +47,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends apt-utils && ap wget \ xz-utils -ENV GO_VERSION $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 \ diff --git a/system-probe_x64/Dockerfile b/system-probe_x64/Dockerfile index ffb4c5065..b23d4bab0 100644 --- a/system-probe_x64/Dockerfile +++ b/system-probe_x64/Dockerfile @@ -1,7 +1,7 @@ FROM debian:buster ARG DEBIAN_FRONTEND=noninteractive -ARG GIMME_GO_VERSION=1.19.5 +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 @@ -48,7 +48,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends apt-utils && ap wget \ xz-utils -ENV GO_VERSION $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 \