Skip to content

Commit

Permalink
Downgrade Node.js to v14
Browse files Browse the repository at this point in the history
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 1afd07d.
  • Loading branch information
victorlin committed Dec 16, 2022
1 parent 2080641 commit 3b53f7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3b53f7a

Please sign in to comment.