From 03f8b6c551705d98abb2eaa5ea08fa56f3f94e26 Mon Sep 17 00:00:00 2001 From: Mikhail Cheshkov Date: Tue, 26 Nov 2024 17:39:15 +0200 Subject: [PATCH] fix: Install python3 executable for node-gyp By default node-gyp looks only for `python` and `python3` executables, and python3.11 package installs only `python3.11` That leads to failure during installation optional dependency `java` from NPM even in `-jdk` image --- packages/cubejs-docker/dev.Dockerfile | 3 ++- packages/cubejs-docker/latest-debian-jdk.Dockerfile | 3 ++- packages/cubejs-docker/latest.Dockerfile | 3 ++- packages/cubejs-docker/local.Dockerfile | 5 +++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/cubejs-docker/dev.Dockerfile b/packages/cubejs-docker/dev.Dockerfile index 5c24cc59e68fe..8f6b8b9143de4 100644 --- a/packages/cubejs-docker/dev.Dockerfile +++ b/packages/cubejs-docker/dev.Dockerfile @@ -8,8 +8,9 @@ ENV CI=0 RUN DEBIAN_FRONTEND=noninteractive \ && apt-get update \ + # python3 package is necessary to install `python3` executable for node-gyp && apt-get install -y --no-install-recommends libssl3 curl \ - cmake python3.11 libpython3.11-dev gcc g++ make cmake openjdk-17-jdk-headless \ + cmake python3 python3.11 libpython3.11-dev gcc g++ make cmake openjdk-17-jdk-headless \ && rm -rf /var/lib/apt/lists/* ENV RUSTUP_HOME=/usr/local/rustup diff --git a/packages/cubejs-docker/latest-debian-jdk.Dockerfile b/packages/cubejs-docker/latest-debian-jdk.Dockerfile index 67bf6b607cf10..4197ddbe2c1e4 100644 --- a/packages/cubejs-docker/latest-debian-jdk.Dockerfile +++ b/packages/cubejs-docker/latest-debian-jdk.Dockerfile @@ -10,8 +10,9 @@ RUN yarn config set network-timeout 120000 -g # Required for node-oracledb to buld on ARM64 RUN apt-get update \ + # python3 package is necessary to install `python3` executable for node-gyp # libpython3-dev is needed to trigger post-installer to download native with python - && apt-get install -y python3.11 libpython3.11-dev gcc g++ make cmake openjdk-17-jdk-headless \ + && apt-get install -y python3 python3.11 libpython3.11-dev gcc g++ make cmake openjdk-17-jdk-headless \ && rm -rf /var/lib/apt/lists/* # We are copying root yarn.lock file to the context folder during the Publish GH diff --git a/packages/cubejs-docker/latest.Dockerfile b/packages/cubejs-docker/latest.Dockerfile index 81dda462810a1..f8029d96b74ba 100644 --- a/packages/cubejs-docker/latest.Dockerfile +++ b/packages/cubejs-docker/latest.Dockerfile @@ -9,8 +9,9 @@ RUN yarn config set network-timeout 120000 -g # Required for node-oracledb to buld on ARM64 RUN apt-get update \ + # python3 package is necessary to install `python3` executable for node-gyp # libpython3-dev is needed to trigger post-installer to download native with python - && apt-get install -y python3.11 libpython3.11-dev gcc g++ make cmake \ + && apt-get install -y python3 python3.11 libpython3.11-dev gcc g++ make cmake \ && rm -rf /var/lib/apt/lists/* # We are copying root yarn.lock file to the context folder during the Publish GH diff --git a/packages/cubejs-docker/local.Dockerfile b/packages/cubejs-docker/local.Dockerfile index 49f4e755d273c..64d9bd5a8773e 100644 --- a/packages/cubejs-docker/local.Dockerfile +++ b/packages/cubejs-docker/local.Dockerfile @@ -10,7 +10,8 @@ ENV CUBEJS_DOCKER_IMAGE_TAG=latest RUN DEBIAN_FRONTEND=noninteractive \ && apt-get update \ - && apt-get install -y --no-install-recommends libssl3 python3.11 libpython3.11-dev \ + # python3 package is necessary to install `python3` executable for node-gyp + && apt-get install -y --no-install-recommends libssl3 python3 python3.11 libpython3.11-dev \ && rm -rf /var/lib/apt/lists/* ENV NODE_ENV=production @@ -30,7 +31,7 @@ RUN yarn config set network-timeout 120000 -g # Required for node-oracledb to buld on ARM64 RUN apt-get update \ - && apt-get install -y python3 gcc g++ make cmake \ + && apt-get install -y gcc g++ make cmake \ && rm -rf /var/lib/apt/lists/* # We are copying root yarn.lock file to the context folder during the Publish GH