Docker安装Linux环境
程序员文章站
2024-03-25 13:48:22
...
官网有安装的文档:https://docs.docker.com/install/linux/docker-ce/ubuntu/ 国外的网站 安装过谷歌助手的 多等一会就可以访问
Centos7
sudo yum install -y epel-release.noarch
安装:
yum install -y docker-io
启动
service docker start
Ubuntu19
更新源
sudo apt-get update
安装存储库
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
进行安装
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
修改配置文件
https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors 阿里云镜像加速
如下安装配置操作 下面的4条命令即可
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://76w856pv.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker