Docker安装

一、环境

Centos7

二、安装步骤

1.Docker 要求 CentOS 系统的内核版本高于 3.10 ,查看本页面的前提条件来验证你的CentOS 版本是否支持 Docker 。

[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

2.安装必要的依赖

[root@localhost ~]# sudo yum install -y yum-utils device-mapper-persistent-data lvm2

3.增加软件源信息

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

更新 yum 缓存

yum makecache fast

4.安装docker ce

yum -y install docker-ce

5.启动docker

systemctl start docker
systemctl enable docker

6.测试运行hello workd

docker run hello-world

 

posted @ 2019-08-22 16:28  deathmen  阅读(142)  评论(0编辑  收藏  举报