Based on Ubuntu16.04LTS
Install via script
$ curl -sSL https://get.docker.com/ | sh
Or choose the domestic DaoCloud installation script
$ curl -sSL https://get.daocloud.io/docker | sh
start the service
$ sudo systemctl enable docker
$ sudo systemctl start docker
User groups and user additions
Create docker user group
$ sudo groupadd docker
Add the current user to the docker group:
$ sudo usermod -aG docker $USER
Add mirror acceleration
Edit /etc/systemd/system/multi-user.target.wants/docker.service
, set ExecStart=/usr/bin/dockerd --registry-mirror=镜像加速地址
. The mirror acceleration address can be applied through DaoCloud (log in through Github, click the rocket logo on the upper right of the main interface. The mirror address is in the form of http://6f221110.m.daocloud.io).
reboot
$ sudo systemctl daemon-reload
$ sudo systemctl restart docker
After passing docker info
or ps -ef | grep dockerd
verifying
Install the visual management tool - portainer
Installation starts
$ docker run -d -p 9000:9000 --restart always -v /var/run/docker.sock:/var/run/docker.sock -v /opt/portainer:/data portainer/portainer
Then the browser can localhost:9000
access
Remarks : It may be required initially sudo docker
, and you can use it directly after logging out and re-entering docker
.