首页 > 系统相关 >【Dockerfile】nvm-git-node-centos7镜像

【Dockerfile】nvm-git-node-centos7镜像

时间:2023-03-03 15:13:56浏览次数:46  
标签:node repo git centos7 sh yum && nvm

# 依赖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

相关文章