A, Docker components
1.Docker is a client - server (c / s) architecture program
2. Key:
Mirror: Mirror container as "source code", object-oriented analogies: Class (operating system image can be said to include a piece of software)
Container: is one of the operating system: the object (that is, a container containing a certain operating system software has been started)
Mirroring is the cornerstone of building Docker users to run their own container-based mirroring. Docker is also mirrored in the building lifecycle.
Docker's official website: https://hub.docker.com/
Two, Docker installation and startup
1.Docker mounted (installed in centos7 the following example)
1.yum update to the latest package
sudo yum update
2. Install package needs, yum-uti provide yum-config-manager function, the other two are driven devicemapper dependent.
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
3. Set yum source cloud Ali
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
4. Install docker (usually installed directly docker run this step is installed on the line, you can not run other steps to install and then check the version check if you have installed)
yum install docker-ce -y
5. View version
docker -v
2. Set ustc mirror (Tsinghua disposed below the source, is provided after the docker software download faster)
Edit the file:
we /etc/docker/daemon.json
Enter the following in the file:
{ "registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"] #清华源 }
3.Docker start and stop
systemctl command is the command system services manager
Start docker:
systemctl start docker
Stop docker:
systemctl stop docker
Restart docker:
systemctl restart docker
View docker Status:
systemctl status docker
boot:
systemctl enable docker
View docker summary information:
docker info
。。。