Skip to content

Commit d95e346

Browse files
committed
fix: install latest npm version for node 22
1 parent 03fb07b commit d95e346

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ LABEL maintainer="[email protected]" \
1818
org.opencontainers.image.documentation="https://github.com/beevelop/docker-android-nodejs/blob/latest/README.md" \
1919
org.opencontainers.image.source="https://github.com/beevelop/docker-android-nodejs.git"
2020

21-
# Install Node.js using NodeSource repository
22-
RUN apt-get update && apt-get install -y curl ca-certificates && \
23-
curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
24-
apt-get install -y nodejs && \
21+
# Install Node.js 22 with compatible npm using official Node.js binaries
22+
ENV NODE_VERSION=22.18.0
23+
RUN apt-get update && apt-get install -y curl ca-certificates xz-utils && \
24+
curl -fsSL https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz | tar -xJ -C /usr/local --strip-components=1 && \
25+
npm install -g npm@latest && \
2526
npm install -g yarn && \
2627
apt-get clean && \
2728
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \

0 commit comments

Comments
 (0)