ITPub博客

首页 > IT职业 > IT图书 > centos 安装 docker

centos 安装 docker

IT图书 作者:smith12us 时间:2021-09-09 10:47:23 0 删除 编辑

1.安装工具和驱动包

yum install -y yum-utils device-mapper-persistent-data lvm2

2.配置国内yum源

yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

yum makecache fast

3.安装docker

yum -y install docker-ce

4.启动docker

service docker start
docker version

5.hello world

docker pull hello-world

docker run hello-world

6. 阿里云镜像加速配置

查看个人专属加速地址。

vi /etc/docker/daemon.json

{
  "registry-mirrors": ["https://xxxxxx.mirror.aliyuncs.com"]
}
sudo systemctl daemon-reload 
sudo systemctl restart docker 

本文由 奔跑的杂粮煎饼 发布~

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/3181/viewspace-2826181/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-08-30

  • 博文量
    80
  • 访问量
    516