I Docker is installed in Ubuntu16.04
Prerequisite, Docker system requirements Ubuntu kernel version is higher than 3.10, view your current kernel version uname -r command by
uname -r
Uses scripts to install Docker
1. Obtain the latest version of the installation package Docker
wget -qO- https://get.docker.com/ | sh
We recommend using the root user directly manipulate, if an ordinary user needs prompted for a password, enter the password to install
After installation is complete there is a hint:
When you want to run docker directly to non-root user needs to perform sudo usermod -aG docker runoob command, and then re-login, or there will be given as follows
2. Start docker background service
sudo service docker start
Hello-world test run
docker run hello-world
There is more proof output has been successfully installed.
3. Mirror accelerate
In view of the domestic network problems, the subsequent pulling Docker image is very slow, we may need to configure the accelerator to solve,
Here Netease mirror address: http: //hub-mirror.c.163.com.
The new version of Docker use /etc/docker/daemon.json(Linux) or% programdata% \ docker \ config \ daemon.json (Windows) to configure the Daemon.
Please join in the configuration file (the file is not the case, please build a):
{
"registry-mirrors": ["http://hub-mirror.c.163.com"]
}
After you add the following command to perform the update:
service docker restart
You can also go to Ali cloud Ali cloud mirror service to choose Acceleration:
Ali cloud container mirror service: https://www.aliyun.com/product/acr?spm=5176.8142029.388261.563.e9396d3ejcUZkN
Docker official Chinese mirror acceleration: https://registry.docker-cn.com
NetEase: http://hub-mirror.c.163.com
中国科技大学:https://docker.mirrors.ustc.edu.cn
阿里云镜像加速:https://www.aliyun.com/product/acr?spm=5176.8142029.388261.563.e9396d3ejcUZkN (注册后使用)
Daocloud:https://www.daocloud.io/mirror#accelerator-doc (注册后使用,和阿里镜像加速一样)
USTC:https://docker.mirrors.ustc.edu.cn
参考来源:https://www.runoob.com/docker/ubuntu-docker-install.html
菜鸟教程上也有以阿里云源和中科大源来下载的教程。