【Docker官方源】DOCKER 和 DOCKER COMPOSE 一键安装脚本

1、CentOS 卸载 Docker 教程

sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine

2、Debian / Ubuntu 卸载 Docker 教程

sudo apt-get remove docker docker-engine docker.io containerd runc

 

3、官方源docker安装

安装 Docker
 centos
yum install -y yum-utils yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo yum install docker-ce docker-ce-cli containerd.io -y systemctl start docker systemctl enable docker
ubuntu/debian
sudo apt-get update sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common -y curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" sudo apt-get install docker-ce docker-ce-cli containerd.io -y systemctl start docker systemctl enable docker
安装Docker-compose
curl -fsSL https://get.docker.com | bash -s docker curl -L "https://github.com/docker/compose/releases/download/1.26.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose

评论区
头像