File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,13 @@ ENV BLACKFIRE_VERSION=${BLACKFIRE_VERSION}
1717
1818RUN apt-get update && \
1919 apt-get install -y --no-install-recommends gnupg && \
20- curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - && \
20+ if [[ "${NODE_VERSION}" -lt "16" ]]; then \
21+ curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | sudo bash -; \
22+ else \
23+ sudo mkdir -p /etc/apt/keyrings && \
24+ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
25+ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list; \
26+ fi && \
2127 apt-get update && \
2228 apt-get install -y --no-install-recommends nodejs && \
2329 curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
Original file line number Diff line number Diff line change @@ -417,7 +417,13 @@ ONBUILD ARG NODE_VERSION
417417ONBUILD RUN if [ -n "$NODE_VERSION" ]; then \
418418 sudo apt-get update && \
419419 sudo apt-get install -y --no-install-recommends gnupg && \
420- curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | sudo bash - && \
420+ if [[ "${NODE_VERSION}" -lt "16" ]]; then \
421+ curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | sudo bash -; \
422+ else \
423+ sudo mkdir -p /etc/apt/keyrings && \
424+ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
425+ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list; \
426+ fi && \
421427 sudo apt-get update && \
422428 sudo apt-get install -y --no-install-recommends nodejs && \
423429 curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && \
You can’t perform that action at this time.
0 commit comments