From 8e679c9272bcbc4f31fba37198a7034cf7cfd90d Mon Sep 17 00:00:00 2001 From: AsP3X Date: Wed, 27 Jul 2022 14:33:48 +0200 Subject: [PATCH] TASK: changed install method for nvm and node --- Dockerfile | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2df17ae..cc79125 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,17 +10,38 @@ LABEL maintainer="aptalca" # environment settings ENV HOME="/config" -RUN apt clean && apt update && apt upgrade -y -RUN apt install -y \ - apt-transport-https \ - ca-certificates \ - curl \ - gnupg-agent \ - software-properties-common +RUN rm /bin/sh && ln -s /bin/bash /bin/sh -RUN apt install nano wget htop curl git zip unzip -y +# Set debconf to run non-interactively +RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections -RUN curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash +# Install base dependencies +RUN apt-get update && apt-get install -y -q --no-install-recommends \ + apt-transport-https \ + build-essential \ + ca-certificates \ + curl \ + git \ + libssl-dev \ + wget \ + gnupg-agent \ + software-properties-common \ + && rm -rf /var/lib/apt/lists/* + +ENV NVM_DIR /usr/local/nvm # or ~/.nvm , depending +ENV NODE_VERSION 0.10.33 + +# Install nvm with node and npm +RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.20.0/install.sh | bash \ + && . $NVM_DIR/nvm.sh \ + && nvm install $NODE_VERSION \ + && nvm alias default $NODE_VERSION \ + && nvm use default + +ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules +ENV PATH $NVM_DIR/v$NODE_VERSION/bin:$PATH + +RUN apt install nano wget htop zip unzip -y RUN \ echo "**** install node repo ****" && \ @@ -72,4 +93,4 @@ RUN \ COPY /root / # ports and volumes -EXPOSE 8443 +EXPOSE 8443 \ No newline at end of file