首页 > 其他 > 详细

Centos7安装docker

时间:2019-11-04 00:58:33      阅读:73      评论:0      收藏:0      [点我收藏+]

一、安装

1.安装前依赖安装

1 yum -y install gcc gcc-c++ yum-utils device-mapper-persistent-data lvm2

 

2.卸载旧版docker

1 $ sudo yum remove docker                   docker-client                   docker-client-latest                   docker-common                   docker-latest                   docker-latest-logrotate                   docker-logrotate                   docker-engine

3.设置yum源

yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

4.yum安装docker

yum install docker-ce

5.启动docker并设置开机自启

sudo systemctl start docker
sudo systemctl enable docker

6.查看docker版本

[root@centos702 23:14:47]:/root
#docker version
Client: Docker Engine - Community
 Version:           19.03.4
 API version:       1.40
 Go version:        go1.12.10
 Git commit:        9013bf583a
 Built:             Fri Oct 18 15:52:22 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.4
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.10
  Git commit:       9013bf583a
  Built:            Fri Oct 18 15:50:54 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

 

Centos7安装docker

原文:https://www.cnblogs.com/cnhope/p/11789893.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!