Skip to content

Latest commit

 

History

History
34 lines (29 loc) · 1.12 KB

File metadata and controls

34 lines (29 loc) · 1.12 KB

How to install docker

https://mirror.tuna.tsinghua.edu.cn/help/docker-ce/

Note that linux package mirror has been changed to tsinghua.

Ubuntu

sudo apt-get remove docker docker-engine docker.io
sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
   "deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
sudo apt-get update
sudo apt-get install docker-ce

Fedora/CentOS/RHEL

sudo yum remove docker docker-common docker-selinux docker-engine
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/centos/docker-ce.repo
sudo sed -i 's+download.docker.com+mirrors.tuna.tsinghua.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo

sudo yum makecache fast
sudo yum install docker-ce

Post configuration

sudo groupadd docker # Add your user to the docker group.
sudo usermod -aG docker $USER