diff --git a/Dockerfile b/Dockerfile index 244d3e08c..b6e0ebff0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,19 +2,25 @@ FROM docker.io/emscripten/emsdk:3.1.24 # Enable detection of running in a container -ENV RUNNING_IN_CONTAINER=true +ENV RUNNING_IN_CONTAINER=true \ + # Avoid using bundled Node from emsdk + PATH=$EMSDK:$EMSDK/upstream/emscripten:$EMSDK/upstream/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RUN apt-get update \ + && curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \ && apt-get install -qqy \ - build-essential \ autoconf \ + build-essential \ + libglib2.0-dev \ libtool \ + nodejs \ pkgconf \ - libglib2.0-dev \ # needed for Meson ninja-build \ python3-pip \ - && pip3 install meson + && pip3 install meson \ + # Prefer the default system-installed version of Node.js + && echo "NODE_JS = '$(which node)'" >> $EMSDK/.emscripten ARG MESON_PATCH=https://github.com/kleisauke/wasm-vips/raw/master/build/patches/meson-emscripten.patch RUN cd $(dirname `python3 -c "import mesonbuild as _; print(_.__path__[0])"`) \ diff --git a/build.sh b/build.sh index 979055cc8..a71498047 100755 --- a/build.sh +++ b/build.sh @@ -154,6 +154,7 @@ echo "=============================================" echo "Environment" echo "=============================================" emcc --version +node --version cd $(dirname $(which emcc)) diff --git a/build/README.md b/build/README.md index beb369601..98664b39f 100644 --- a/build/README.md +++ b/build/README.md @@ -24,8 +24,7 @@ git pull ./emsdk activate tot # Prefer the default system-installed version of Node.js -NODE=$(which node) -sed -i'.old' "/^NODE_JS/s/= .*/= '${NODE//\//\\/}'/" .emscripten +echo "NODE_JS = '$(which node)'" >> .emscripten # Activate PATH and other environment variables in the current terminal source ./emsdk_env.sh