1, system related commands:

1.1 view docker version information: docker version

2.2 download mirrors: docker pull image_name

, which can be used to specify whether all the mirrors are displayed.

2.4 deletes the existing mirrors: docker RMI image_name/ id

2.6 exports mirrors, saved as tar packages:

 $docker save. $docker load -i file_path $docker load < /home/save.tar 

2.8 publication docker mirror

. Ng> three, container manages

3.1 interactive startup container, and enters: docker run -i -t image_name /bin/bash

(Note: when executing apt-get command, you need to bring the -y parameter. If the -y parameter is not specified, the apt-get command will enter the interactive mode and require the user to enter the command to confirm it, but in the docker environment it is impossible to respond to this interaction. After the apt-get command has been executed, the container will stop, but the changes to the container will not be lost. (

3.3 view all existing containers:

 docker PS showing that the container is running, docker PS -a, displaying all containers, including the container that has been stopped. "B51.net/file_images/article/201806/2018060216372412.png" >

3.4 preserves the container as a mirror: docker commit ID new_image_name

3.5 delete all container docker RM `docker PS, delete a single container and stop, start and kill a container $docker stop Name/ID $docker start Name/ID $docker kill Name/ID

3.8 read container log. The src= "//files.jb51.net/file_images/article/201806/2018060216372413.png" >

3.10 displays the process information inside a running container,

3.11 copies the file / directory from the container to the local path

 $docker CP Name:/container_path to_path Re> 

3.12 restarts a running container,

3.13 attached to a running container,

 $docker attach ID 

3.14 from a container out of a container. The home of the script.

This paper fixed link:http://www.script-home.com/dockers-basic-commands-use-notes.html | Script Home | +Copy Link

Article reprint please specify:Docker’s basic commands use notes | Script Home

You may also be interested in these articles!