File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,11 +39,12 @@ RUN apt-get update \
3939 && rm -rf /var/lib/apt/lists/*
4040
4141
42+ ENV NODE_MAJOR=20
4243# Based on nodesource installation instructions https://github.com/nodesource/distributions#installation-instructions
4344RUN mkdir -p /etc/apt/keyrings \
4445 && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
4546 | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
46- && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18 .x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
47+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR .x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
4748 && apt-get update \
4849 && apt-get install nodejs -y
4950
Original file line number Diff line number Diff line change @@ -39,11 +39,12 @@ RUN apt-get update \
3939 && rm -rf /var/lib/apt/lists/*
4040
4141
42+ ENV NODE_MAJOR=20
4243# Based on nodesource installation instructions https://github.com/nodesource/distributions#installation-instructions
4344RUN mkdir -p /etc/apt/keyrings \
4445 && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
4546 | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
46- && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18 .x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
47+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR .x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
4748 && apt-get update \
4849 && apt-get install nodejs -y
4950
You can’t perform that action at this time.
0 commit comments