docker安装
2020-05-17 本文已影响0人
王宣成
快速安装脚本
curl sh.rainbond.com/install_docker | bash
安装Docker-CE
yum install -y yum-utils device-mapper-persistent-data lvm2
增加最新版本的Docker安装仓库
yum-config-manager --add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
安装Docker-CE版本
sudo yum install -y docker-ce docker-ce-cli containerd.io
启动docker
sudo systemctl enable docker
允许开机启动
sudo systemctl start docker
docker镜像加速
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://3dfsrjo9.mirror.aliyuncs.com"]
}
EOF
sudo systemctl restart docker
安装docker-compse
sudo curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version