Skip to content

Commit 02a8194

Browse files
committed
fix(tools/node): correct installation path
1 parent aee98fb commit 02a8194

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

tools/node/Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# syntax=docker.io/docker/dockerfile-upstream:1.14.0-labs
2+
13
FROM builder AS build
24

35
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
@@ -26,11 +28,8 @@ ENV NODE_ARCH=""
2628
RUN . /tmp/node_arch.env && export NODE_ARCH
2729

2830
# Download and extract official prebuilt Node.js binary
29-
RUN . /tmp/node_arch.env; \
30-
curl -fsSL -o node.tar.xz https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-${NODE_ARCH}.tar.xz \
31-
&& tar -xJf node.tar.xz \
32-
&& rm node.tar.xz \
33-
&& mv node-v${NODE_VERSION}-${NODE_ARCH}/ $TOOLS_DIR/
31+
COPY --chmod=0755 install-node.sh /usr/local/bin
32+
RUN install-node.sh
3433

3534
# Vendor non-glibc shared libraries
3635
RUN vendor-dependencies.sh

tools/node/install-node.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
set -ex
2+
3+
export $(cat /tmp/node_arch.env)
4+
5+
curl -fsSL -o node.tar.xz https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-${NODE_ARCH}.tar.xz
6+
tar -xJf node.tar.xz
7+
rm node.tar.xz
8+
mv node-v${NODE_VERSION}-${NODE_ARCH}/bin $TOOLS_DIR/
9+
mv node-v${NODE_VERSION}-${NODE_ARCH}/include $TOOLS_DIR/
10+
mv node-v${NODE_VERSION}-${NODE_ARCH}/lib $TOOLS_DIR/
11+
mv node-v${NODE_VERSION}-${NODE_ARCH}/share $TOOLS_DIR/

0 commit comments

Comments
 (0)