Skip to content

Commit

Permalink
Update Node.js install steps
Browse files Browse the repository at this point in the history
setup_xx.x is deprecated now. Use deb package directly instead.
  • Loading branch information
kateinoigakukun committed Nov 16, 2023
1 parent ab37856 commit 9c9cac4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 7 additions & 1 deletion builders/wasm32-unknown-emscripten/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
FROM emscripten/emsdk:3.1.31

ARG NODE_MAJOR_VERSION=20

RUN set -eux; \
apt-get update; \
apt-get install ruby bison make autoconf git curl build-essential libyaml-dev zlib1g-dev gosu -y; \
curl -fsSL https://deb.nodesource.com/setup_16.x | bash -; \
apt-get install -y 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_$NODE_MAJOR_VERSION.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list; \
apt-get update; \
apt-get install nodejs -y; \
apt-get clean; \
rm -r /var/lib/apt/lists/*
Expand Down
7 changes: 6 additions & 1 deletion builders/wasm32-unknown-wasi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
FROM debian:bullseye

ARG WASI_PRESET_ARGS_VERSION=0.1.1
ARG NODE_MAJOR_VERSION=20

RUN set -eux; \
apt-get update; \
apt-get install ruby bison make autoconf git curl build-essential libyaml-dev zlib1g-dev gosu -y; \
curl -fsSL https://deb.nodesource.com/setup_16.x | bash -; \
apt-get install -y 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_$NODE_MAJOR_VERSION.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list; \
apt-get update; \
apt-get install nodejs -y; \
apt-get clean; \
rm -r /var/lib/apt/lists/*
Expand Down

0 comments on commit 9c9cac4

Please sign in to comment.