windows x86电脑的虚拟机上安装docker
2025-02-27 11:12 Spiderman25 阅读(1) 评论(0) 收藏 举报设置yum源(阿里)
https://blog.csdn.net/lovely_nn/article/details/141454446
$ wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
$ yum makecache
docker安装
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install -y docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo systemctl enable docker
sudo systemctl enable docker
sudo docker run hello-world
添加docker镜像源
https://www.cnblogs.com/xyz/p/18567902
如果docker下载镜像慢,可以进行以下配置(前提已经在windows电脑上用VtwoRay设置了代理以及允许局域网连接)
编辑环境变量文件
vi /etc/profile
#如果需要验证身份则配置以下配置http_proxy = http://username:password@proxyserver:port
export http_proxy="http://proxyserver:port"
export https_proxy="https://proxyserver:port"
#no_proxy:无需代理的主机或域名;可以使用通配符,多个时使用","号分隔
export no_proxy="localhost,127.0.0.1"
执行以下命令使配置生效
source /etc/profile
vi /etc/profile
#如果需要验证身份则配置以下配置http_proxy = http://username:password@proxyserver:port
export http_proxy="http://proxyserver:port"
export https_proxy="https://proxyserver:port"
#no_proxy:无需代理的主机或域名;可以使用通配符,多个时使用","号分隔
export no_proxy="localhost,127.0.0.1"
执行以下命令使配置生效
source /etc/profile

浙公网安备 33010602011771号