|
@ -1,19 +1,19 @@ |
|
|
FROM ubuntu:22.04 |
|
|
FROM ubuntu:22.04 |
|
|
|
|
|
|
|
|
RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list ; \ |
|
|
RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list; \ |
|
|
sed -i 's/security.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list ; \ |
|
|
sed -i 's/security.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list; \ |
|
|
apt-get update ; \ |
|
|
apt-get update; \ |
|
|
apt-get install -y --no-install-recommends build-essential zlib1g-dev libncurses5-dev \ |
|
|
apt-get install -y --no-install-recommends build-essential zlib1g-dev libncurses5-dev \ |
|
|
libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev gcc g++ \ |
|
|
libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev gcc g++ \ |
|
|
libsqlite3-dev wget libbz2-dev coreutils util-linux ca-certificates wget \ |
|
|
libsqlite3-dev wget libbz2-dev coreutils util-linux ca-certificates wget \ |
|
|
patch dstat vim curl git sudo glibc-source python3 python3-pip python2 ; \ |
|
|
patch dstat vim curl git sudo glibc-source python3 python3-pip python2; \ |
|
|
apt-get clean ; \ |
|
|
apt-get clean; \ |
|
|
rm -rf /var/lib/apt/lists/* ; \ |
|
|
rm -rf /var/lib/apt/lists/*; \ |
|
|
ln -s /usr/bin/python3 /usr/bin/python |
|
|
ln -s /usr/bin/python3 /usr/bin/python |
|
|
|
|
|
|
|
|
ADD nvm.tar.gz /home/nvm/.nvm |
|
|
ADD nvm.tar.gz /home/nvm/.nvm |
|
|
|
|
|
|
|
|
RUN useradd -d /home/nvm -s /bin/bash nvm ; \ |
|
|
RUN useradd -d /home/nvm -s /bin/bash nvm; \ |
|
|
echo 'nvm ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers; \ |
|
|
echo 'nvm ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers; \ |
|
|
chown nvm:nvm -R "home/nvm/" |
|
|
chown nvm:nvm -R "home/nvm/" |
|
|
|
|
|
|
|
@ -21,12 +21,11 @@ USER nvm |
|
|
|
|
|
|
|
|
WORKDIR /home/nvm |
|
|
WORKDIR /home/nvm |
|
|
|
|
|
|
|
|
RUN echo 'export NVM_DIR="$HOME/.nvm"' >> "$HOME/.bashrc" ; \ |
|
|
RUN echo 'export NVM_DIR="$HOME/.nvm"' >> "$HOME/.bashrc"; \ |
|
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> "$HOME/.bashrc" ; \ |
|
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> "$HOME/.bashrc"; \ |
|
|
echo '[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> "$HOME/.bashrc" ; \ |
|
|
echo '[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> "$HOME/.bashrc"; \ |
|
|
bash -c 'source $HOME/.nvm/nvm.sh ; \ |
|
|
bash -c 'source $HOME/.nvm/nvm.sh; \ |
|
|
nvm install 16 ; \ |
|
|
nvm install 16; \ |
|
|
nvm install 14 ; \ |
|
|
nvm install 14; \ |
|
|
nvm install 12' |
|
|
nvm install 12' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|