diff --git a/Dockerfile b/Dockerfile index 07443d068e3fb..558f45826818e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,9 @@ ARG JAVA_VERSION=17 ARG UBUNTU_VERSION=jammy +# Global nodeJS version used across multiple stages +ARG NODEJS_VERSION=20.9.0 + # Use OpenJDK Eclipe Temurin Ubuntu LTS FROM eclipse-temurin:$JAVA_VERSION-jdk-$UBUNTU_VERSION as base @@ -181,7 +184,7 @@ COPY --from=pythonbuild /opt/python /opt/python FROM base AS nodejsbuild ARG BOWER_VERSION=1.8.12 -ARG NODEJS_VERSION=20.9.0 +ARG NODEJS_VERSION ARG NPM_VERSION=10.1.0 ARG PNPM_VERSION=8.8.0 ARG YARN_VERSION=1.22.17 @@ -455,7 +458,7 @@ COPY --from=python --chown=$USER:$USER $PYENV_ROOT $PYENV_ROOT RUN syft $PYENV_ROOT -o spdx-json --file /usr/share/doc/ort/ort-python.spdx.json # NodeJS -ARG NODEJS_VERSION=18.14.2 +ARG NODEJS_VERSION ENV NVM_DIR=/opt/nvm ENV PATH=$PATH:$NVM_DIR/versions/node/v$NODEJS_VERSION/bin COPY --from=nodejs --chown=$USER:$USER $NVM_DIR $NVM_DIR