Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid 60-second delay from deprecated Node install script #4643

Closed
p2edwards opened this issue Sep 19, 2023 · 1 comment
Closed

Avoid 60-second delay from deprecated Node install script #4643

p2edwards opened this issue Sep 19, 2023 · 1 comment

Comments

@p2edwards
Copy link
Contributor

p2edwards commented Sep 19, 2023

Description

Nodesource has deprecated their curl-bash script (https://deb.nodesource.com/setup_16.x), so now we see this when building kpi images:

TO AVOID THIS WAIT MIGRATE THE SCRIPT 
Continuing in 60 seconds (press Ctrl-C to abort)

To fix this, we can switch to Nodesource's new deb packages on nodistro.

🚧 completely untested code patch that tries to keep it in a single run command
diff --git a/Dockerfile b/Dockerfile
index 29b8cc9eb..645f87975 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -56,8 +56,13 @@ RUN mkdir -p "${NGINX_STATIC_DIR}" && \
 # jnm (or the current on-call sysadmin). Thanks.
 
 RUN apt-get -qq update && \
-    apt-get -qq -y install curl && \
-    curl -sL https://deb.nodesource.com/setup_16.x | bash - && \
+    apt-get -qq -y install ca-certificates curl gnupg && \
+    mkdir -p /etc/apt/keyrings && \
+    curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
+        | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
+    echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" \
+        | tee /etc/apt/sources.list.d/nodesource.list && \
+    apt-get -qq update && \
     apt-get -qq -y install --no-install-recommends \
         ffmpeg \
         gdal-bin \

Related issues

Somewhat related to #4498

@LMNTL
Copy link
Contributor

LMNTL commented Nov 27, 2023

Fixed by kpi#4644.

@LMNTL LMNTL closed this as completed Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants