170324-Docker之旅-CentOS7中安装Docker

CentOS7中安装Docker服务支持

yum update

1
$ sudo yum update

Get Docker CE on CentOS

You can install Docker CE on CentOS in just three steps.
Enterprise customers can also install Docker EE for CentOS.
Prerequisites

Docker CE is supported on CentOS 7.3 64-bit.

1. Set up the repository

Set up the Docker CE repository on CentOS:

1
2
3
4
5
6
7
$ sudo yum install -y yum-utils

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

$ sudo yum makecache fast

2. Get Docker CE

Install the latest version of Docker CE on CentOS:

1
$ sudo yum -y install docker-ce

Start Docker:

1
$ sudo systemctl start docker

3. Test your Docker CE installation

Test your installation:

1
$ sudo docker run hello-world

设置为开机自启

1
$ sudo chkconfig docker on

-------------本文结束感谢您的阅读-------------
Alex.Yao wechat
欢迎您扫一扫上面的微信公众号,订阅我的博客!
坚持原创技术分享,您的支持将鼓励我继续创作!