v1.0:
yum install wget -y
yum install *.rpm
systemctl enable docker
systemctl start docker
curl -L https://get.daocloud.io/docker/compose/releases/download/1.27.4/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Docker可视化
docker run --name=portainer --restart=always -d -p 9000:9000 --privileged=true -v /var/run/docker.sock:/var/run/docker.sock -v /docker/portainer:/data -v /etc/localtime:/etc/localtime portainer/portainer
v1.1:
1.x卸载旧版本:
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
2.安装
安装yum-utils包并且建立稳定库源
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
启用nightly或者test repositories
sudo yum-config-manager --enable docker-ce-nightly
sudo yum-config-manager --enable docker-ce-test
关闭nightly
sudo yum-config-manger --disable docker-ce-nightly
安装docker引擎
sudo yum install docker-ce docker-ce-cli containerd.io
安装特定版本的docker引擎
yum list docker-ce --showduplicates | sort -r # 仓库中查看docker版本
sudo yum install docker-ce-<VERSION_STRING> docker-ce-li-<BERSION_STRING> containerd.io # 安装特定版本的docker
sudo systemctl start docker # 启动docker
sudo docker run hello-world # 验证是否安装成功