# 依赖centos环境 FROM centos:7 #安装vim、git和nvm环境 RUN yum install -y wget \ && mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak \ && wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo \ && yum -y update \ && yum -y install vim \ && yum -y install git \ && git --version \ && cd ~/ \ && git clone https://gitee.com/Annlix/nvm-sh_nvm.git .nvm \ && cd ~/.nvm && git checkout v0.39.1 \ && echo "source ~/.nvm/nvm.sh" >> ~/.bashrc && source ~/.bashrc RUN chmod +x ~/.nvm/nvm.sh \ && ~/.nvm/nvm.sh install 14.20.0 \ && ~/.nvm/nvm.sh use 14.20.0
标签:node,repo,git,centos7,sh,yum,&&,nvm From: https://www.cnblogs.com/zipon/p/17175676.html