首页 > 系统服务 > 详细

docker 更改默认的cache目录

时间:2019-10-22 22:37:06      阅读:150      评论:0      收藏:0      [点我收藏+]
安装

apt-get update
apt-get -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
apt-get -y update
apt-get -y install docker-ce

docker version

国内镜像

mac

"registry-mirrors" : [
"https://qhmz3eak.mirror.aliyuncs.com"
],

ubuntu

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-‘EOF‘
{
"registry-mirrors": ["https://qhmz3eak.mirror.aliyuncs.com"],
"graph": "/work/soft/docker/cache"
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

docker 更改默认的cache目录

原文:https://blog.51cto.com/13766835/2444571

(1)
(1)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!