Skip to content

Commit 109dfce

Browse files
authored
feat: use node version manager (#188)
* use n node version manager * remove extra install of node * remove temporal n
1 parent a9ec4f3 commit 109dfce

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ARG BUCK_VERSION=2022.05.05.01
1919
# for Buck to pick it up correctly.
2020
ARG NDK_VERSION_BUCK=21.4.7075529
2121
ARG NDK_VERSION_GRADLE=23.1.7779620
22-
ARG NODE_VERSION=14.x
22+
ARG NODE_VERSION=14
2323
ARG WATCHMAN_VERSION=4.9.0
2424
ARG CMAKE_VERSION=3.18.1
2525

@@ -87,12 +87,12 @@ RUN apt update -qq && apt install -qq -y --no-install-recommends \
8787
&& gem install bundler \
8888
&& rm -rf /var/lib/apt/lists/*;
8989

90-
# install nodejs and yarn packages from nodesource
91-
RUN curl -sL https://deb.nodesource.com/setup_${NODE_VERSION} | bash - \
92-
&& apt-get update -qq \
93-
&& apt-get install -qq -y --no-install-recommends nodejs \
94-
&& npm i -g yarn \
95-
&& rm -rf /var/lib/apt/lists/*
90+
# install nodejs using n
91+
RUN curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n \
92+
&& bash n $NODE_VERSION \
93+
&& rm n \
94+
&& npm install -g n \
95+
&& npm install -g yarn
9696

9797
# download and install buck using the java11 pex from Jitpack
9898
RUN curl -L https://jitpack.io/com/github/facebook/buck/v${BUCK_VERSION}/buck-v${BUCK_VERSION}-java11.pex -o /tmp/buck.pex \

0 commit comments

Comments
 (0)