安装Docker
使用我预先准备好的一键部署脚本:
1
sudo curl -s https://gitee.com/maxidea/shell/raw/master/docker-install.sh | bash
Copied!
或:
手动安装步骤:
1
sudo apt-get update
2
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
3
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
4
sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
5
sudo apt-get -y update
6
sudo apt-get -y install docker-ce
Copied!
/etc/docker下创建daemon.json
加入镜像加速地址:
1
{
2
"exec-opts": ["native.cgroupdriver=systemd"],
3
"registry-mirrors": ["https://r9xxm8z8.mirror.aliyuncs.com", "https://registry.docker-cn.com", "https://docker.mirrors.ustc.edu.cn" ]
4
}
Copied!
启动docker:
sudo systemctl start docker
查看docker状态:
sudo docker info
查看docker指令:
docker run --help
Last modified 1yr ago
Copy link