Skip to content

Commit

Permalink
fix: Install python3 executable for node-gyp
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mcheshkov committed Nov 26, 2024
1 parent deeb5e2 commit bd817dd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion packages/cubejs-docker/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion packages/cubejs-docker/latest-debian-jdk.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion packages/cubejs-docker/latest.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions packages/cubejs-docker/local.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit bd817dd

Please sign in to comment.