From 8cebb0d6490cf5d859f7d9d54b4018afaf15b7c7 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Fri, 16 Dec 2022 09:12:38 -0500 Subject: [PATCH] Downgrade Node.js to v14 Node.js v16 is very slow when running in an arm64 Docker build on an amd64 build platform. Node.js v14 runs in the build without emulation. It uses emulation in the Docker container during run time, but the slowness there is not nearly as significant as the build time increase due to emulation. This should be reverted if/when cross-compilation is used, i.e. Node.js v16 can run natively on the build platform while installing packages for a different target platform. This reverts commit 1afd07dae89be39b145ab465d42f5fd8b12cedd8. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1168c235..741dc7c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ # Install a specific Node.js version # https://github.com/nodesource/distributions/blob/0d81da75/README.md#installation-instructions -RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \ +RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \ && apt-get update && apt-get install -y nodejs # Used for platform-specific instructions @@ -297,7 +297,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ # Install a specific Node.js version # https://github.com/nodesource/distributions/blob/0d81da75/README.md#installation-instructions -RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \ +RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \ && apt-get update && apt-get install -y nodejs # Configure bash for interactive usage