Skip to content

Commit bd817dd

Browse files
committed
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
1 parent deeb5e2 commit bd817dd

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

packages/cubejs-docker/dev.Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ ENV CI=0
88

99
RUN DEBIAN_FRONTEND=noninteractive \
1010
&& apt-get update \
11+
# python3 package is necessary to install `python3` executable for node-gyp
1112
&& apt-get install -y --no-install-recommends libssl3 curl \
12-
cmake python3.11 libpython3.11-dev gcc g++ make cmake openjdk-17-jdk-headless \
13+
cmake python3 python3.11 libpython3.11-dev gcc g++ make cmake openjdk-17-jdk-headless \
1314
&& rm -rf /var/lib/apt/lists/*
1415

1516
ENV RUSTUP_HOME=/usr/local/rustup

packages/cubejs-docker/latest-debian-jdk.Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ RUN yarn config set network-timeout 120000 -g
1010

1111
# Required for node-oracledb to buld on ARM64
1212
RUN apt-get update \
13+
# python3 package is necessary to install `python3` executable for node-gyp
1314
# libpython3-dev is needed to trigger post-installer to download native with python
14-
&& apt-get install -y python3.11 libpython3.11-dev gcc g++ make cmake openjdk-17-jdk-headless \
15+
&& apt-get install -y python3 python3.11 libpython3.11-dev gcc g++ make cmake openjdk-17-jdk-headless \
1516
&& rm -rf /var/lib/apt/lists/*
1617

1718
# We are copying root yarn.lock file to the context folder during the Publish GH

packages/cubejs-docker/latest.Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ RUN yarn config set network-timeout 120000 -g
99

1010
# Required for node-oracledb to buld on ARM64
1111
RUN apt-get update \
12+
# python3 package is necessary to install `python3` executable for node-gyp
1213
# libpython3-dev is needed to trigger post-installer to download native with python
13-
&& apt-get install -y python3.11 libpython3.11-dev gcc g++ make cmake \
14+
&& apt-get install -y python3 python3.11 libpython3.11-dev gcc g++ make cmake \
1415
&& rm -rf /var/lib/apt/lists/*
1516

1617
# We are copying root yarn.lock file to the context folder during the Publish GH

packages/cubejs-docker/local.Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ ENV CUBEJS_DOCKER_IMAGE_TAG=latest
1010

1111
RUN DEBIAN_FRONTEND=noninteractive \
1212
&& apt-get update \
13-
&& apt-get install -y --no-install-recommends libssl3 python3.11 libpython3.11-dev \
13+
# python3 package is necessary to install `python3` executable for node-gyp
14+
&& apt-get install -y --no-install-recommends libssl3 python3 python3.11 libpython3.11-dev \
1415
&& rm -rf /var/lib/apt/lists/*
1516

1617
ENV NODE_ENV=production
@@ -30,7 +31,7 @@ RUN yarn config set network-timeout 120000 -g
3031

3132
# Required for node-oracledb to buld on ARM64
3233
RUN apt-get update \
33-
&& apt-get install -y python3 gcc g++ make cmake \
34+
&& apt-get install -y gcc g++ make cmake \
3435
&& rm -rf /var/lib/apt/lists/*
3536

3637
# We are copying root yarn.lock file to the context folder during the Publish GH

0 commit comments

Comments
 (0)