docker安装

1.运行环境
我用的centos环境,必须是centos7.4以上,否则会出现各种难解的问题

2.移除旧版本docker

$ sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-selinux \
                  docker-engine-selinux \
                  docker-engine

3.安装必要的系统工具

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

4.添加软件源信息

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

使用国内阿里云提供的镜像

5.更新yum缓存

sudo yum makecache fast

6.安装docker-ce

sudo yum -y install docker-ce

7.启动docker服务

sudo systemctl start docker

8.测试运行hello world

docker run hello-world

运行结果:

docker安装

参考文档:
http://www.runoob.com/docker/centos-docker-install.html

Original: https://www.cnblogs.com/shijingjing07/p/10523315.html
Author: 迪米特
Title: docker安装

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/534815/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球