win10 docker 安装centos7镜像,并安装python环境


  1. 拉取centos镜像
    docker pull centos:centos7
    进入centos
    docker run -it --name centos centos:centos7
    下载wget
    yum -y install wget
  2. 修改yum源对系统yum源进行备份

    • 对系统yum源进行备份
      mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
      • 下载想使用的yum源,这里使用aliyun源
        wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

    • 运行
      yum makecache
      yum -y update

  3. 安装python  
    借鉴 :https://www.cnblogs.com/xiujin/p/11477419.html


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM