mirror of
https://github.com/linuxserver/docker-code-server
synced 2025-06-26 18:27:40 +00:00
TASK: changed install method for nvm and node
This commit is contained in:
parent
3d8ca86d01
commit
8e679c9272
41
Dockerfile
41
Dockerfile
@ -10,17 +10,38 @@ LABEL maintainer="aptalca"
|
|||||||
# environment settings
|
# environment settings
|
||||||
ENV HOME="/config"
|
ENV HOME="/config"
|
||||||
|
|
||||||
RUN apt clean && apt update && apt upgrade -y
|
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
|
||||||
RUN apt install -y \
|
|
||||||
apt-transport-https \
|
|
||||||
ca-certificates \
|
|
||||||
curl \
|
|
||||||
gnupg-agent \
|
|
||||||
software-properties-common
|
|
||||||
|
|
||||||
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 \
|
RUN \
|
||||||
echo "**** install node repo ****" && \
|
echo "**** install node repo ****" && \
|
||||||
@ -72,4 +93,4 @@ RUN \
|
|||||||
COPY /root /
|
COPY /root /
|
||||||
|
|
||||||
# ports and volumes
|
# ports and volumes
|
||||||
EXPOSE 8443
|
EXPOSE 8443
|
||||||
Loading…
Reference in New Issue
Block a user