美文网首页
安装docker和docker-compose

安装docker和docker-compose

作者: 吹奏一池春水 | 来源:发表于2020-05-24 11:17 被阅读0次

docker安装

https://docs.docker.com/engine/install/ubuntu/
到添加docker源步骤需改成如下的阿里云源:

sudo add-apt-repository \
   "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

docker-compose安装

https://docs.docker.com/compose/install/

若因网络问题按官方方法无法安装,可从以下地址直接下载改名上传至/usr/local/bin
https://github.com/docker/compose/releases/

修改docker镜像源

sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://[your id].mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

相关文章

网友评论

      本文标题:安装docker和docker-compose

      本文链接:https://www.haomeiwen.com/subject/nqvdahtx.html