centos系统环境搭建专栏点击跳转
[root@VM-4-17-centos ~]# uname -r
3.10.0-1160.88.1.el7.x86_64
Docker 要求 CentOS 系统的内核版本高于 3.10
yum update
yum install -y yum-utils device-mapper-persistent-data lvm2
yum -y install docker
systemctl start docker
systemctl enable docker
使用hello-world
镜像验证
docker run hello-world
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose --version