TASK: changed install method for nvm and node

This commit is contained in:
AsP3X 2022-07-27 14:33:48 +02:00
parent 3d8ca86d01
commit 8e679c9272

View File

@ -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