Docker的快速安装

壮心未与年俱老,死去犹能作鬼雄。这篇文章主要讲述Docker的快速安装相关的知识,希望能为你提供帮助。


1. 前期准备
1.首先关闭防火墙,并检查selinux关闭

systemctl stop firewalld
systemctl disable firewalld
复制代码

2.安装iptables
systemctl start iptables
yum install iptables-services
systemctl restart iptables
systemctl enable iptables
iptables -F
service iptables save
复制代码

3.更新内核,并重启
yum update
reboot
复制代码

4.安装
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum list docker-ce --showduplicates | sort -r
yum install -y docker-ce-18.03.1.ce
复制代码

5.启动
systemctl start docker
systemctl enable docker
复制代码

6.设置加速网站??[http://hub-mirror.c.163.com](http://hub-mirror.c.163.com/)??
7.docker-compose的安装
curl -L [https://github.com/docker/compose/releases/download/1.25.4/docker-compose-](https://github.com/docker/compose/releases/download/1.14.0/docker-compose-)`uname -s`-`uname -m` > /usr/local/bin/docker-compose            //也可以自己下载然后放在/usr/local/bin/docker-compose下
chmod a+x  /usr/local/bin/docker-compose
docker version
docker-compose --version



【Docker的快速安装】

    推荐阅读