Skip to content

Commit ff022b9

Browse files
committed
feat: switching to pre-compiled node install
1 parent 3be71d5 commit ff022b9

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

Dockerfile

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,16 @@ ENV NODE_VERSIONS \
113113
22.12.0
114114
RUN set -xe && \
115115
for VERSION in $NODE_VERSIONS; do \
116-
curl -fSsL "https://nodejs.org/dist/v$VERSION/node-v$VERSION.tar.gz" -o /tmp/node-$VERSION.tar.gz && \
117-
mkdir /tmp/node-$VERSION && \
118-
tar -xf /tmp/node-$VERSION.tar.gz -C /tmp/node-$VERSION --strip-components=1 && \
119-
rm /tmp/node-$VERSION.tar.gz && \
120-
cd /tmp/node-$VERSION && \
121-
./configure \
122-
--prefix=/usr/local/node-$VERSION && \
123-
make -j$(nproc) && \
124-
make -j$(nproc) install && \
125-
rm -rf /tmp/*; \
116+
curl -fSsL "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" -o /tmp/node.tar.xz && \
117+
mkdir -p /usr/local/node-$NODE_VERSION && \
118+
tar -xf /tmp/node.tar.xz -C /usr/local/node-$NODE_VERSION --strip-components=1 && \
119+
rm /tmp/node.tar.xz
126120
done
127121

122+
RUN ln -s /usr/local/node-22.12.0/bin/node /usr/bin/node && \
123+
ln -s /usr/local/node-22.12.0/bin/npm /usr/bin/npm && \
124+
ln -s /usr/local/node-22.12.0/bin/npx /usr/bin/npx
125+
128126
# Check for latest version here: https://www.rust-lang.org
129127
ENV RUST_VERSIONS \
130128
1.83.0

0 commit comments

Comments
 (0)