# GoogleTest Installation FROM harbor.sl.defence-elec.de/proxydockerhub/library/ubuntu:26.04 LABEL maintainer="Legatus Team" LABEL description="GoogleTest testing framework" LABEL version="1.15.2" ENV DEBIAN_FRONTEND=noninteractive ARG HTTP_PROXY="" ARG HTTPS_PROXY="" ARG NO_PROXY="localhost,127.0.0.1,.sl.defence-elec.de" ENV http_proxy=${HTTP_PROXY} ENV https_proxy=${HTTPS_PROXY} ENV no_proxy=${NO_PROXY} ARG GTEST_VERSION=1.15.2 # Install build dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential cmake git \ && rm -rf /var/lib/apt/lists/* # Clone and build GoogleTest RUN git clone --depth 1 --branch v${GTEST_VERSION} \ https://github.com/google/googletest.git /tmp/googletest \ && cd /tmp/googletest \ && mkdir build && cd build \ && cmake -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local \ -DBUILD_SHARED_LIBS=ON \ .. \ && cmake --build . -j$(nproc) \ && cmake --install . \ && rm -rf /tmp/googletest # Update library cache RUN ldconfig # Verify installation RUN pkg-config --modversion gtest | grep -q "${GTEST_VERSION}" CMD ["/bin/bash"]