阿里云centos7.5 阿里云安装docker

一、安装docker

1、判断系统内核版本,docker 系统的内核版本高于 3.10

[root@localhost ~]# uname -r
3.10.0-1062.el7.x86_64

 2、更新centos系统,一直选y执行完

[root@localhost ~]# sudo yum update

3、 安装需要的软件包, yum-util 提供yum-config-manager功能,另外两个是devicemapper驱动依赖的,一直y执行完

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

4、 设置yum源

[root@localhost ~]# sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

5、安装最新稳定版docker,一直y执行完

[root@localhost ~]# sudo yum install docker-ce

6、启动并设置开机自动启动docker

[root@localhost ~]# sudo systemctl start docker
[root@localhost ~]# sudo systemctl enable docker

7、安装完,查看一下版本

[root@localhost ~]# docker version
Client: Docker Engine - Community
 Version:           19.03.5
 API version:       1.40
 Go version:        go1.12.12
 Git commit:        633a0ea
 Built:             Wed Nov 13 07:25:41 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.5
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.12
  Git commit:       633a0ea
  Built:            Wed Nov 13 07:24:18 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

 

你可能感兴趣的:(后端服务器,技术,centOS,阿里云,docker)