1、CentOS 安装 Docker
- CentOS 7.9
添加 阿里云 镜像源:
cat >/etc/yum.repos.d/docker.repo << EOF
[docker-ce-edge]
name=Docker CE Edge - \$basearch
baseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/\$basearch/edge
enabled=1
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
EOF
安装 docker:文章源自十年又十年-https://www.bbigsun.com/293.html
yum install -y docker-ce
查看 docker 版本:文章源自十年又十年-https://www.bbigsun.com/293.html
docker --version
启动 docker:文章源自十年又十年-https://www.bbigsun.com/293.html
systemctl start docker
允许 docker 开机自启:文章源自十年又十年-https://www.bbigsun.com/293.html
systemctl enable docker
关闭 docker:文章源自十年又十年-https://www.bbigsun.com/293.html
systemctl stop docker
2、Linux 系统安装 Docker
使用官方脚本安装,安装命令如下:文章源自十年又十年-https://www.bbigsun.com/293.html
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
也可以使用国内 daocloud 一键安装命令:文章源自十年又十年-https://www.bbigsun.com/293.html
curl -sSL https://get.daocloud.io/docker | sh
文章源自十年又十年-https://www.bbigsun.com/293.html文章源自十年又十年-https://www.bbigsun.com/293.html 纸上得来终觉浅,绝知此事要躬行。
17688689121
我的微信
微信扫一扫
评论