Skip to content

Commit 56b7408

Browse files
mabrarovedsiper
authored andcommitted
dockerfile: ensuring CMake version is not greater than the latest supported one for Linux containers.
Signed-off-by: Marat Abrarov <[email protected]>
1 parent 6d3b551 commit 56b7408

File tree

1 file changed

+2
-25
lines changed

1 file changed

+2
-25
lines changed

dockerfiles/Dockerfile

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -55,22 +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-
ARG CMAKE_URL="https://github.com/Kitware/CMake/releases/download"
66-
67-
RUN mkdir -p "${CMAKE_HOME}" && \
68-
cmake_download_url="${CMAKE_URL}/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(uname -m).tar.gz" && \
69-
echo "Downloading CMake ${CMAKE_VERSION}: ${cmake_download_url} -> ${CMAKE_HOME}" && \
70-
curl -jksSL "${cmake_download_url}" | tar -xzf - -C "${CMAKE_HOME}" --strip-components 1
71-
72-
ENV PATH="${CMAKE_HOME}/bin:${PATH}"
73-
7462
# Must be run from root of repo
7563
WORKDIR /src/fluent-bit/
7664
COPY . ./
@@ -268,21 +256,10 @@ RUN echo "deb http://deb.debian.org/debian bookworm-backports main" >> /etc/apt/
268256
htop atop strace iotop sysstat ncdu logrotate hdparm pciutils psmisc tree pv \
269257
make tar flex bison \
270258
libssl-dev libsasl2-dev libsystemd-dev/bookworm-backports zlib1g-dev libpq-dev libyaml-dev postgresql-server-dev-all \
271-
gzip \
259+
&& apt-get satisfy -y cmake "cmake (<< 4.0)" \
272260
&& apt-get clean \
273261
&& rm -rf /var/lib/apt/lists/*
274262

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

0 commit comments

Comments
 (0)