Single

Docker安装

Ubuntu

sudo apt-get -y remove docker docker-engine docker-ce docker-ce-cli docker.io
sudo apt-get -y update
sudo apt-get -y install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common
curl -fsSL "${DOCKER_EE_URL}/ubuntu/gpg" | sudo apt-key add -
sudo add-apt-repository \
   "deb [arch=$(dpkg --print-architecture)] $DOCKER_EE_URL/ubuntu \
   $(lsb_release -cs) \
   stable-$DOCKER_EE_VERSION"
sudo apt-get -y update
sudo apt-get -y install docker-ee docker-ee-cli containerd.io

Centos

yum -y install epel*
curl -fsSL https://get.docker.com -o get-docker.sh && bash get-docker.sh 
systemctl start docker ;systemctl enable docker

sudo usermod -aG docker your-user
#配置镜像加速
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://7yf4jzdv.mirror.aliyuncs.com"],
  "insecure-registries": ["0.0.0.0"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

暂无评论

发表评论