Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[devcontainer] Update cmake to detect Python 3.12 #740

Merged
merged 3 commits into from
Feb 26, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ ARG TARGETARCH
ARG GO_VERSION
ARG DEVA_VERSION
ARG PYTHON_VERSION=3.12
ARG CMAKE_VERSION=3.30.2
ARG CMAKE_SHA256_AMD64="33f5a7680578481ce0403dc5a814afae613f2f6f88d632a3bda0f7ff5f4dedfc"
ARG CMAKE_SHA256_ARM64="8a6636e72a6ddfe50e0087472bff688f337df48b00a7728b12d7b70b5b459fc5"
ENV DEBIAN_FRONTEND=noninteractive
ENV DATADOG_AGENT_EMBEDDED_PATH=/opt/datadog-agent/embedded

RUN apt-get update && apt-get upgrade -y && \
# Common + Agent (Core/Trace/Process) dependencies
apt-get install -y wget software-properties-common build-essential apt-transport-https libsystemd-dev cmake sudo vim git curl procps ruby ruby-dev autoconf automake libtool libtool-bin gettext autopoint checkpolicy policycoreutils policycoreutils-python-utils bison pkg-config docker.io docker-buildx docker-compose-v2 ninja-build \
apt-get install -y wget software-properties-common build-essential apt-transport-https libsystemd-dev sudo vim git curl procps ruby ruby-dev autoconf automake libtool libtool-bin gettext autopoint checkpolicy policycoreutils policycoreutils-python-utils bison pkg-config docker.io docker-buildx docker-compose-v2 ninja-build \
# Network feature tests
openjdk-11-jre-headless \
# System-probe dependencies
Expand All @@ -26,6 +29,23 @@ RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
# Install latest pip
RUN curl -sSL https://bootstrap.pypa.io/get-pip.py | python3

# CMake setup
RUN if [ "$TARGETARCH" = "arm64" ] ; then set -ex \
&& curl -sL -o cmake.sh https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-aarch64.sh \
&& echo "${CMAKE_SHA256_ARM64} cmake.sh" | sha256sum --check \
&& mkdir -p /opt/cmake/ \
&& sh cmake.sh --skip-license --prefix=/opt/cmake \
&& ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake \
&& rm cmake.sh ; fi

RUN if [ "$TARGETARCH" = "amd64" ] ; then set -ex \
&& curl -sL -o cmake.sh https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh \
&& echo "${CMAKE_SHA256_AMD64} cmake.sh" | sha256sum --check \
&& mkdir -p /opt/cmake/ \
&& sh cmake.sh --skip-license --prefix=/opt/cmake \
&& ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake \
&& rm cmake.sh ; fi

# Create user
RUN useradd -g 20 -u 503 -m datadog -s /bin/bash -G sudo,root && \
echo 'datadog ALL=(ALL:ALL) NOPASSWD:ALL' > /etc/sudoers.d/datadog && \
Expand Down