安装docker和docker-compose
2020-05-24 本文已影响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