安装 Docker

BBigSun 评论397阅读模式

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

纸上得来终觉浅,绝知此事要躬行。

weinxin
17688689121
我的微信
微信扫一扫
Docker最后更新:2024-5-11
BBigSun
  • 本文由 BBigSun 发表于 2023年 2月 20日 09:51:39
  • 转载请务必保留本文链接:https://www.bbigsun.com/293.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定