Ubuntu's software source configuration file is /etc/apt/sources.list
Change the domestic one, or you will be crazy. The following is the drop of Tsinghua University:
# The source image is commented by default to improve the speed of apt update, if necessary, you can uncomment it yourself deb https: // mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse # deb-src https: // mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse deb https: // mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse # deb-src https: // mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse deb https : // mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse # deb-src https: // mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse deb https: // mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse # deb-src https: // mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
Then reboot the server.
$ sudo apt-get update $ sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - $ sudo apt-key fingerprint 0EBFCD88 $ sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" $ sudo apt-get update $ sudo apt-get install docker-ce
Then configure a docker accelerator
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://xxxxxxxxx.m.daocloud.io
Then according to the prompt, restart the docker service, enter docker info, and you can see the docker situation~