File tree Expand file tree Collapse file tree 8 files changed +56
-8
lines changed Expand file tree Collapse file tree 8 files changed +56
-8
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,13 @@ ENV BLACKFIRE_VERSION=${BLACKFIRE_VERSION}
1818
1919RUN apt-get update && \
2020 apt-get install -y --no-install-recommends gnupg && \
21- curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - && \
21+ if [[ "${NODE_VERSION}" -lt "16" ]]; then \
22+ curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | sudo bash -; \
23+ else \
24+ sudo mkdir -p /etc/apt/keyrings && \
25+ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
26+ 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; \
27+ fi && \
2228 apt-get update && \
2329 apt-get install -y --no-install-recommends nodejs && \
2430 curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
Original file line number Diff line number Diff line change @@ -18,7 +18,13 @@ ENV BLACKFIRE_VERSION=${BLACKFIRE_VERSION}
1818
1919RUN apt-get update && \
2020 apt-get install -y --no-install-recommends gnupg && \
21- curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - && \
21+ if [[ "${NODE_VERSION}" -lt "16" ]]; then \
22+ curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | sudo bash -; \
23+ else \
24+ sudo mkdir -p /etc/apt/keyrings && \
25+ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
26+ 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; \
27+ fi && \
2228 apt-get update && \
2329 apt-get install -y --no-install-recommends nodejs && \
2430 curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
Original file line number Diff line number Diff line change @@ -18,7 +18,13 @@ ENV BLACKFIRE_VERSION=${BLACKFIRE_VERSION}
1818
1919RUN apt-get update && \
2020 apt-get install -y --no-install-recommends gnupg && \
21- curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - && \
21+ if [[ "${NODE_VERSION}" -lt "16" ]]; then \
22+ curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | sudo bash -; \
23+ else \
24+ sudo mkdir -p /etc/apt/keyrings && \
25+ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
26+ 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; \
27+ fi && \
2228 apt-get update && \
2329 apt-get install -y --no-install-recommends nodejs && \
2430 curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
Original file line number Diff line number Diff line change @@ -388,7 +388,13 @@ ONBUILD ARG NODE_VERSION
388388ONBUILD RUN if [ -n "$NODE_VERSION" ]; then \
389389 sudo apt-get update && \
390390 sudo apt-get install -y --no-install-recommends gnupg && \
391- curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | sudo bash - && \
391+ if [[ "${NODE_VERSION}" -lt "16" ]]; then \
392+ curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | sudo bash -; \
393+ else \
394+ sudo mkdir -p /etc/apt/keyrings && \
395+ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
396+ 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; \
397+ fi && \
392398 sudo apt-get update && \
393399 sudo apt-get install -y --no-install-recommends nodejs && \
394400 curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && \
Original file line number Diff line number Diff line change @@ -293,7 +293,13 @@ ONBUILD ARG NODE_VERSION
293293ONBUILD RUN if [ -n "$NODE_VERSION" ]; then \
294294 sudo apt-get update && \
295295 sudo apt-get install -y --no-install-recommends gnupg && \
296- curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | sudo bash - && \
296+ if [[ "${NODE_VERSION}" -lt "16" ]]; then \
297+ curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | sudo bash -; \
298+ else \
299+ sudo mkdir -p /etc/apt/keyrings && \
300+ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
301+ 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; \
302+ fi && \
297303 sudo apt-get update && \
298304 sudo apt-get install -y --no-install-recommends nodejs && \
299305 curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && \
Original file line number Diff line number Diff line change @@ -316,7 +316,13 @@ ONBUILD ARG NODE_VERSION
316316ONBUILD RUN if [ -n "$NODE_VERSION" ]; then \
317317 sudo apt-get update && \
318318 sudo apt-get install -y --no-install-recommends gnupg && \
319- curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | sudo bash - && \
319+ if [[ "${NODE_VERSION}" -lt "16" ]]; then \
320+ curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | sudo bash -; \
321+ else \
322+ sudo mkdir -p /etc/apt/keyrings && \
323+ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
324+ 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; \
325+ fi && \
320326 sudo apt-get update && \
321327 sudo apt-get install -y --no-install-recommends nodejs && \
322328 curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && \
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