diff --git a/Dockerfile b/Dockerfile index 964e904..e4f745b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:latest # important environment variables -ENV NODE_VERSION_LTS="4.4.7" NODE_VERSION_STABLE="6.2.2" NVM_DIR="/usr/local/nvm" +ENV NODE_VERSION_LTS="4.4.7" NODE_VERSION_STABLE="6.3.0" NVM_DIR="/usr/local/nvm" # Set debconf to run non-interactively and install packages RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \ @@ -24,10 +24,10 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio # Install nvm with node and npm RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash \ && bash -c "source $NVM_DIR/nvm.sh \ - && nvm install $NODE_VERSION_LTS \ - && nvm alias default $NODE_VERSION_LTS \ + && nvm install $NODE_VERSION_STABLE \ + && nvm alias default $NODE_VERSION_STABLE \ && nvm use default \ && npm install -g npm" -ENV NODE_PATH $NVM_DIR/v$NODE_VERSION_LTS/lib/node_modules -ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION_LTS/bin:$PATH +ENV NODE_PATH $NVM_DIR/v$NODE_VERSION_STABLE/lib/node_modules +ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION_STABLE/bin:$PATH diff --git a/Dockerfile_lts b/Dockerfile_lts index d2e3a8d..66d9cb3 100644 --- a/Dockerfile_lts +++ b/Dockerfile_lts @@ -1 +1,10 @@ FROM hosttoday/ht-docker-node:latest + +RUN bash -c "source $NVM_DIR/nvm.sh \ + && nvm install $NODE_VERSION_LTS \ + && nvm alias default $NODE_VERSION_LTS \ + && nvm use default \ + && npm install -g npm" + +ENV NODE_PATH $NVM_DIR/v$NODE_VERSION_LTS/lib/node_modules +ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION_LTS/bin:$PATH \ No newline at end of file diff --git a/Dockerfile_stable b/Dockerfile_stable index b5a510e..d2e3a8d 100644 --- a/Dockerfile_stable +++ b/Dockerfile_stable @@ -1,10 +1 @@ FROM hosttoday/ht-docker-node:latest - -RUN bash -c "source $NVM_DIR/nvm.sh \ - && nvm install $NODE_VERSION_STABLE \ - && nvm alias default $NODE_VERSION_STABLE \ - && nvm use default \ - && npm install -g npm" - -ENV NODE_PATH $NVM_DIR/v$NODE_VERSION_STABLE/lib/node_modules -ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION_STABLE/bin:$PATH \ No newline at end of file