1) pull the mirror
Input command docker pull centos: 7 pulled from the warehouse mirror centos7
2) Check local mirror
Command: docker images
You can view the image has been put centos pulled to the local
3) create and run a container
Command: docker run -d -i -t 9f38484d220f / bin / bash
Format: docker run -d -i -t <IMAGE ID> / bin / bash
After executing the command, the container ID will appear below the command.
4) into the vessel using
Command: docker exec -it 6c928 bash
Before the container 5 where only the input ID, the system will automatically identify the container ID
Format: docker exec -it <CONTAINER ID> bash
5) Installation Tools
Enter ifconfig command to view the card information, the system can not find
Input command to install: yum install -y net-tools
Ping test whether you can access the Internet