Docker used herein, Community Edition, version 19.03.2, this version is the latest version at the time of writing this article.
Yesterday newly purchased Tencent cloud of Linux server, recording the first time under installation Docker. Execute commands directly into your browser with WebShell login linux.
1. 安装deltarpm
yum provides '*/applydeltarpm'
yum install deltarpm
2. Install Docker
wget -qO- https://get.docker.com/ | SH
3. Add users to the Docker group (your-user is your user name, you can add root)
sudo the usermod -Ag the User-Docker your
4. Check whether to add the user successfully
cat / etc / group | grep docker
Note: if successful will output docker: x: 992: your- user
5. If you are adding a user currently logged on user will need to
execute the command to restart:
Single-User: reboot
multiuser: shutdown -r now
6. You can then use the command to view information doker version and install this complete
docker --version
7. Configure docker
Create Directory: mkdir / etc / docker
create and edit a configuration file: vim /etc/docker/daemon.json
key presses: i
copy paste into json follows:
{
"Storage-Driver": "devicemapper",
"Storage-the opts": []
}
keyboard press ESC
to save and exit input :: wq
see just the contents of the file: cat /etc/docker/daemon.json
restart docker: systemctl restart docker.service
official documentation about the configuration file: https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
If an individual learning to use, no configuration file is also available. Delete command: rm -f /etc/docker/daemon.json
8. Check the command execution
Docker Version
Docker System info