Skip to content

Commit d657cd9

Browse files
committed
dockerfile: ensuring CMake version is not greater than the latest supported one for Linux containers.
Signed-off-by: Marat Abrarov <abrarov@gmail.com>
1 parent 1f9850a commit d657cd9

1 file changed

Lines changed: 2 additions & 24 deletions

File tree

dockerfiles/Dockerfile

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,10 @@ RUN echo "deb http://deb.debian.org/debian bookworm-backports main" >> /etc/apt/
5555
flex \
5656
bison \
5757
libyaml-dev \
58-
gzip \
58+
&& apt-get satisfy -y cmake "cmake (<< 4.0)" \
5959
&& apt-get clean \
6060
&& rm -rf /var/lib/apt/lists/*
6161

62-
ENV CMAKE_HOME="/opt/cmake"
63-
64-
ARG CMAKE_VERSION="3.31.6"
65-
66-
RUN mkdir -p "${CMAKE_HOME}" && \
67-
cmake_url="https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(uname -m).tar.gz" && \
68-
echo "Downloading CMake ${CMAKE_VERSION}: ${cmake_url} -> ${CMAKE_HOME}" && \
69-
curl -jksSL "${cmake_url}" | tar -xzf - -C "${CMAKE_HOME}" --strip-components 1
70-
71-
ENV PATH="${CMAKE_HOME}/bin:${PATH}"
72-
7362
# Must be run from root of repo
7463
WORKDIR /src/fluent-bit/
7564
COPY . ./
@@ -267,21 +256,10 @@ RUN echo "deb http://deb.debian.org/debian bookworm-backports main" >> /etc/apt/
267256
htop atop strace iotop sysstat ncdu logrotate hdparm pciutils psmisc tree pv \
268257
make tar flex bison \
269258
libssl-dev libsasl2-dev libsystemd-dev/bookworm-backports zlib1g-dev libpq-dev libyaml-dev postgresql-server-dev-all \
270-
gzip \
259+
&& apt-get satisfy -y cmake "cmake (<< 4.0)" \
271260
&& apt-get clean \
272261
&& rm -rf /var/lib/apt/lists/*
273262

274-
ENV CMAKE_HOME="/opt/cmake"
275-
276-
ARG CMAKE_VERSION="3.31.6"
277-
278-
RUN mkdir -p "${CMAKE_HOME}" && \
279-
cmake_url="https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(uname -m).tar.gz" && \
280-
echo "Downloading CMake ${CMAKE_VERSION}: ${cmake_url} -> ${CMAKE_HOME}" && \
281-
curl -jksSL "${cmake_url}" | tar -xzf - -C "${CMAKE_HOME}" --strip-components 1
282-
283-
ENV PATH="${CMAKE_HOME}/bin:${PATH}"
284-
285263
RUN rm -f /usr/bin/qemu-*-static
286264
COPY --from=builder /fluent-bit /fluent-bit
287265

0 commit comments

Comments
 (0)