mirror of
https://github.com/yeasy/docker_practice.git
synced 2024-12-01 02:38:54 +00:00
Add figure for the command logic
This commit is contained in:
parent
0258da9046
commit
79934ad3e1
@ -2,21 +2,7 @@
|
|||||||
|
|
||||||
##基本语法
|
##基本语法
|
||||||
docker [OPTIONS] COMMAND [arg...]
|
docker [OPTIONS] COMMAND [arg...]
|
||||||
|
一般来说,docker命令可以用来管理daemon,或者通过CLI命令管理image和container。可以通过man docker来查看这些命令。
|
||||||
|
|
||||||
DESCRIPTION
|
|
||||||
docker has two distinct functions. It is used for starting the Docker daemon and to run the CLI (i.e., to command the daemon to manage images, containers
|
|
||||||
etc.) So docker is both a server, as a daemon, and a client to the daemon, through the CLI.
|
|
||||||
|
|
||||||
|
|
||||||
To run the Docker daemon you do not specify any of the commands listed below but must specify the -d option. The other options listed below are for the
|
|
||||||
daemon only.
|
|
||||||
|
|
||||||
|
|
||||||
The Docker CLI has over 30 commands. The commands are listed below and each has its own man page which explain usage and arguments.
|
|
||||||
|
|
||||||
|
|
||||||
To see the man page for a command run man docker .
|
|
||||||
|
|
||||||
|
|
||||||
##选项
|
##选项
|
||||||
@ -176,3 +162,7 @@ docker的命令可以采用`docker-CMD`或者`docker CMD`的方式执行。两
|
|||||||
|
|
||||||
docker-wait(1)
|
docker-wait(1)
|
||||||
阻塞直到一个容器终止,然后输出它的退出符
|
阻塞直到一个容器终止,然后输出它的退出符
|
||||||
|
|
||||||
|
##一张图总结docker的命令周期
|
||||||
|
|
||||||
|
![命令周期](../images/cmd_logic.png)
|
||||||
|
56
images/cmd_logic.dot
Normal file
56
images/cmd_logic.dot
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
//dot -Tpng xx.dot -o xx.png
|
||||||
|
digraph G {
|
||||||
|
rankdir=TB;
|
||||||
|
fontname = "Microsoft YaHei";
|
||||||
|
fontsize = 14;
|
||||||
|
penwidth = 3;
|
||||||
|
compound=true;
|
||||||
|
rankdir=LR;
|
||||||
|
|
||||||
|
node [shape = record];
|
||||||
|
edge [fontname = "Arial", fontsize = 12, color="darkgreen" ];
|
||||||
|
|
||||||
|
image[label="Image",color=blue];
|
||||||
|
registry[label="Registry",color=blue];
|
||||||
|
tar[label="Tar files",color=blue];
|
||||||
|
|
||||||
|
subgraph cluster_container {
|
||||||
|
label = "Container";
|
||||||
|
style = "bold";
|
||||||
|
color = blue;
|
||||||
|
edge [fontname = "Arial", fontsize = 11, color="skyblue" ];
|
||||||
|
//node [style=filled];
|
||||||
|
run[label="Running",shape=circle, style=filled, fillcolor=green];
|
||||||
|
stop[label="Stopped",shape=circle, style=filled, fillcolor=red];
|
||||||
|
pause[label="Paused",shape=circle, style=filled, fillcolor=blue];
|
||||||
|
|
||||||
|
run->pause[label="pause"];
|
||||||
|
pause->run[label="unpause"];
|
||||||
|
run->run[label="restart"];
|
||||||
|
run->stop[label="kill"];
|
||||||
|
stop->run[label="start"];
|
||||||
|
}
|
||||||
|
|
||||||
|
run->image[label="commit",ltail=cluster_container];
|
||||||
|
image->run[label="start"];
|
||||||
|
|
||||||
|
image->tar[label="export|save"];
|
||||||
|
tar->image[label="import"];
|
||||||
|
|
||||||
|
image->registry[label="push"];
|
||||||
|
registry->image[label="pull"];
|
||||||
|
|
||||||
|
//heat[label="heat commands",color=blue];
|
||||||
|
//heatshell[label="heatclient.shell.HeatShell",color=blue];
|
||||||
|
//shell[label="{heatclient.v1.shell|+do_stack_create\l+do_stack_show\l+do_stack_update\l...\l+do_event_list\l...\l+do_resource_list\l...\l+do_resource_type_show\l...\l+do_template_show\l...\l}",color=blue];
|
||||||
|
//heatclient[label="heatclient.client.Client",color=blue];
|
||||||
|
//client[label="heatclient.v1.client.Client",color=blue];
|
||||||
|
//httpclient[label="heatclient.common.http.HTTPClient",color=blue];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//openstackservices[label="{OpenStack Services|+Nova\l+Neutron\l+Keystone\l...}",color=blue];
|
||||||
|
|
||||||
|
//{rank=same; image cluster_container}
|
||||||
|
//{rank=same; rpcproxy apimixin}
|
||||||
|
}
|
BIN
images/cmd_logic.png
Normal file
BIN
images/cmd_logic.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
Loading…
Reference in New Issue
Block a user