From 839b1c755d93ce3e2f5930d636c9929fe9aefeb9 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 16 Sep 2025 08:06:45 +0200 Subject: [PATCH] Dockerfile: WIP --- .dockerignore | 4 --- Dockerfile => docker/rocky8/Dockerfile | 37 ++++++++++------------ Dockerfile.el9 => docker/rocky9/Dockerfile | 22 +++++++++---- 3 files changed, 32 insertions(+), 31 deletions(-) delete mode 100644 .dockerignore rename Dockerfile => docker/rocky8/Dockerfile (83%) rename Dockerfile.el9 => docker/rocky9/Dockerfile (83%) diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 1bc025ad..00000000 --- a/.dockerignore +++ /dev/null @@ -1,4 +0,0 @@ -build* -cmake-build* -node_modules -frontend/node_modules \ No newline at end of file diff --git a/Dockerfile b/docker/rocky8/Dockerfile similarity index 83% rename from Dockerfile rename to docker/rocky8/Dockerfile index 59c757e7..6340b3a2 100644 --- a/Dockerfile +++ b/docker/rocky8/Dockerfile @@ -30,23 +30,23 @@ RUN dnf -y update && \ xcb-util-keysyms-devel \ xcb-util-renderutil-devel \ libxkbcommon-devel \ - libX11-devel \ - libXext-devel \ - libXrender-devel \ - libXi-devel \ - libXrandr-devel \ - libXcursor-devel \ - libXfixes-devel \ - libXinerama-devel \ - mesa-libGL-devel \ - mesa-libEGL-devel \ - dbus-devel \ - zlib-devel \ - glib2-devel \ - fontconfig-devel \ - openssl-static \ - zlib-static \ - freetype-devel && \ + libX11-devel \ + libXext-devel \ + libXrender-devel \ + libXi-devel \ + libXrandr-devel \ + libXcursor-devel \ + libXfixes-devel \ + libXinerama-devel \ + mesa-libGL-devel \ + mesa-libEGL-devel \ + dbus-devel \ + zlib-devel \ + glib2-devel \ + fontconfig-devel \ + openssl-static \ + zlib-static \ + freetype-devel && \ dnf clean all && rm -rf /var/cache/dnf # Install a recent Node.js (NodeSource). Change NODE_MAJOR if you want another major version. @@ -95,8 +95,5 @@ ENV CMAKE_PREFIX_PATH=/opt/qt-${QT_VERSION}-static:/opt/eigen-3.4 # Set workdir for your project WORKDIR /workspace -# Copy your project (expects a top-level CMakeLists.txt) -COPY . /workspace - # Default entrypoint prints tool versions and hints. CMD ["/bin/bash", "-l"] diff --git a/Dockerfile.el9 b/docker/rocky9/Dockerfile similarity index 83% rename from Dockerfile.el9 rename to docker/rocky9/Dockerfile index 5d7d7dcf..c528ddce 100644 --- a/Dockerfile.el9 +++ b/docker/rocky9/Dockerfile @@ -24,14 +24,11 @@ RUN dnf -y update && \ rpm-build \ rpmdevtools \ numactl-devel \ - openssl-devel \ redhat-rpm-config \ ninja-build \ - # Qt build prerequisites python3 \ perl \ pkgconf-pkg-config \ - # GUI/Widgets/Charts/DBus deps libxcb-devel \ xcb-util-wm-devel \ xcb-util-image-devel \ @@ -51,12 +48,26 @@ RUN dnf -y update && \ dbus-devel \ zlib-devel \ glib2-devel \ - openssl-static \ zlib-static \ fontconfig-devel \ freetype-devel && \ dnf clean all && rm -rf /var/cache/dnf +ARG OPENSSL_VERSION=3.3.2 +RUN set -eux; \ + cd /tmp; \ + curl -LO https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz; \ + tar -xf openssl-${OPENSSL_VERSION}.tar.gz; \ + cd openssl-${OPENSSL_VERSION}; \ + ./Configure linux-x86_64 no-shared no-module no-tests --prefix=/opt/openssl-${OPENSSL_VERSION} --libdir=lib; \ + make -j"$(nproc)"; \ + make install_sw; \ + cd /; rm -rf /tmp/openssl-${OPENSSL_VERSION} /tmp/openssl-${OPENSSL_VERSION}.tar.gz + +# Expose static OpenSSL to CMake/pkg-config +ENV OPENSSL_ROOT_DIR=/opt/openssl-${OPENSSL_VERSION} +ENV PKG_CONFIG_PATH=${OPENSSL_ROOT_DIR}/lib/pkgconfig:${OPENSSL_ROOT_DIR}/lib64/pkgconfig:${PKG_CONFIG_PATH} + # Install a recent Node.js (NodeSource). Change NODE_MAJOR if you want another major version. ARG NODE_MAJOR=22 RUN curl -fsSL https://rpm.nodesource.com/setup_${NODE_MAJOR}.x | bash - && \ @@ -106,8 +117,5 @@ ENV CMAKE_PREFIX_PATH=/opt/qt-${QT_VERSION}-static:/opt/eigen-3.4 # Set workdir for your project WORKDIR /workspace -# Copy your project (expects a top-level CMakeLists.txt) -COPY . /workspace - # Default entrypoint: interactive shell CMD ["/bin/bash", "-l"]