diff --git a/Dockerfile b/Dockerfile index 973f118..ed5f624 100644 --- a/Dockerfile +++ b/Dockerfile @@ -104,19 +104,23 @@ RUN if [ ! -z "$(php --version | grep ^PHP | awk '{print $2}' | grep -v ^7 | gre ENV NVM_DIR /tmp/.nvm RUN mkdir ${NVM_DIR} -RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash # Workaround - Cypress installation ENV CYPRESS_CACHE_FOLDER /tmp/cypress/cache RUN mkdir -p ${CYPRESS_CACHE_FOLDER} && chmod 777 ${CYPRESS_CACHE_FOLDER} -ARG NODE_VERSION=16 +ARG NODE_VERSION=18 COPY build/install-node.sh /tmp/install-node.sh -RUN chmod +x /tmp/install-node.sh && /tmp/install-node.sh "${NODE_VERSION}" +RUN chmod +x /tmp/install-node.sh && /tmp/install-node.sh "${NODE_VERSION}" && \ + ./tmp/install-node.sh "20" && \ + ./tmp/install-node.sh "22" && \ + ./tmp/install-node.sh "24" && \ + ./tmp/install-node.sh "--lts" + COPY .bowerrc /root/.bowerrc ## Compass ## - RUN gem install compass ## Ansible, awscli, other Python tools ## diff --git a/README.md b/README.md index e870a8c..829a7cb 100644 --- a/README.md +++ b/README.md @@ -25,17 +25,7 @@ - terminus - yamllint -**npm packages installed:** -- grunt-cli -- gulp-cli -- bower -- yarn -- lighthouse -- serverless -- firebase-tools -- cypress - -Node and npm are managed by the `build/install-node.sh` script. +Node and npm are managed by the `build/install-node.sh` script. The following versions are supported by default: [16, 18, 20, 22] ## Customize Package and Tool Configurations diff --git a/build/install-node.sh b/build/install-node.sh index f19ab43..9c4edc5 100644 --- a/build/install-node.sh +++ b/build/install-node.sh @@ -43,4 +43,9 @@ npm cache clean --force echo "node ${NODE_VERSION} build completed..." -nvm alias default ${NODE_VERSION} +if [[ "${NODE_VERSION}" =~ "lts" ]]; +then + nvm alias default 'lts/*' +else + nvm alias default "${NODE_VERSION}" +fi