docker安装

安装docker工具

  1. yum install -y yum-utils \ device-mapper-persistent-data \ lvm2

阿里云安装

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

安装docker版本

  1. yum install docker-ce

查看版本

  1. docker -v

启动和设置开机启动

  1. systemctl start dokcer
  2. systemctl enable docker

docker-compose安装

阿里云安装

  1. curl -L https://get.daocloud.io/docker/compose/releases/download/1.24.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose

给docker-compose设置权限

  1. chmod +x /usr/local/bin/docker-compose

查看docker-compose版本

  1. docker-compose --version