1. 命令参考
     http://www.runoob.com/docker/docker-command-manual.html
2. docker-命令,可以使用docker --help查看或者man

 1 [root@test-2 ~]# docker --help
2
3 Usage: docker [OPTIONS] COMMAND
4
5 A self-sufficient runtime for containers
6
7 Options:
8 --config string Location of client config files (default "/root/.docker")
9 -D, --debug Enable debug mode
10 -H, --host list Daemon socket(s) to connect to
11 -l, --log-level string Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")
12 --tls Use TLS; implied by --tlsverify
13 --tlscacert string Trust certs signed only by this CA (default "/root/.docker/ca.pem")
14 --tlscert string Path to TLS certificate file (default "/root/.docker/cert.pem")
15 --tlskey string Path to TLS key file (default "/root/.docker/key.pem")
16 --tlsverify Use TLS and verify the remote
17 -v, --version Print version information and quit
18
19 Management Commands:
20 builder Manage builds
21 config Manage Docker configs
22 container Manage containers
23 engine Manage the docker engine
24 image Manage images
25 network Manage networks
26 node Manage Swarm nodes
27 plugin Manage plugins
28 secret Manage Docker secrets
29 service Manage services
30 stack Manage Docker stacks
31 swarm Manage Swarm
32 system Manage Docker
33 trust Manage trust on Docker images
34 volume Manage volumes
35
36 Commands:
37 attach Attach local standard input, output, and error streams to a running container
38 build Build an image from a Dockerfile
39 commit Create a new image from a container's changes
40 cp Copy files/folders between a container and the local filesystem
41 create Create a new container
42 diff Inspect changes to files or directories on a container's filesystem
43 events Get real time events from the server
44 exec Run a command in a running container
45 export Export a container's filesystem as a tar archive
46 history Show the history of an image
47 images List images
48 import Import the contents from a tarball to create a filesystem image
49 info Display system-wide information
50 inspect Return low-level information on Docker objects
51 kill Kill one or more running containers
52 load Load an image from a tar archive or STDIN
53 login Log in to a Docker registry
54 logout Log out from a Docker registry
55 logs Fetch the logs of a container
56 pause Pause all processes within one or more containers
57 port List port mappings or a specific mapping for the container
58 ps List containers
59 pull Pull an image or a repository from a registry
60 push Push an image or a repository to a registry
61 rename Rename a container
62 restart Restart one or more containers
63 rm Remove one or more containers
64 rmi Remove one or more images
65 run Run a command in a new container
66 save Save one or more images to a tar archive (streamed to STDOUT by default)
67 search Search the Docker Hub for images
68 start Start one or more stopped containers
69 stats Display a live stream of container(s) resource usage statistics
70 stop Stop one or more running containers
71 tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
72 top Display the running processes of a container
73 unpause Unpause all processes within one or more containers
74 update Update configuration of one or more containers
75 version Show the Docker version information
76 wait Block until one or more containers stop, then print their exit codes
77
78 Run 'docker COMMAND --help' for more information on a command.

3. docker info:显示 Docker 系统信息,包括镜像和容器数。

 1 [root@test-2 ~]# docker info
2 Containers: 1
3 Running: 1
4 Paused: 0
5 Stopped: 0
6 Images: 1
7 Server Version: 18.09.0
8 Storage Driver: overlay2
9 Backing Filesystem: extfs
10 Supports d_type: true
11 Native Overlay Diff: false
12 Logging Driver: json-file
13 Cgroup Driver: cgroupfs
14 Plugins:
15 Volume: local
16 Network: bridge host macvlan null overlay
17 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
18 Swarm: inactive
19 Runtimes: runc
20 Default Runtime: runc
21 Init Binary: docker-init
22 containerd version: c4446665cb9c30056f4998ed953e6d4ff22c7c39
23 runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
24 init version: fec3683
25 Security Options:
26 seccomp
27 Profile: default
28 Kernel Version: 3.10.0-514.26.2.el7.x86_64
29 Operating System: CentOS Linux 7 (Core)
30 OSType: linux
31 Architecture: x86_64
32 CPUs: 1
33 Total Memory: 1.796GiB
34 Name: test-2
35 ID: NQXK:WK67:VLVS:YCU5:NMUM:OQT7:SFJL:5B2R:GZD2:X2M7:2MXG:57C6
36 Docker Root Dir: /var/lib/docker
37 Debug Mode (client): false
38 Debug Mode (server): false
39 Registry: https://index.docker.io/v1/
40 Labels:
41 Experimental: false
42 Insecure Registries:
43 127.0.0.0/8
44 Registry Mirrors:
45 https://sv1txjq6.mirror.aliyuncs.com/
46 Live Restore Enabled: false
47 Product License: Community Engine

4. docker inspect  获取容器/镜像的元数据。

 1 [root@test-2 ~]# docker inspect 8a4317175b4e
2 [
3 {
4 "Id": "8a4317175b4e64959655f7f917a49db6c209e61748d54d357cfd354e892812b7",
5 "Created": "2018-11-15T09:36:26.797587129Z",
6 "Path": "nginx",
7 "Args": [
8 "-g",
9 "daemon off;"
10 ],
11 "State": {
12 "Status": "running",
13 "Running": true,
14 "Paused": false,
15 "Restarting": false,
16 "OOMKilled": false,
17 "Dead": false,
18 "Pid": 23664,
19 "ExitCode": 0,
20 ...........................................省略
21 "EndpointID": "5f46f9da4868be3141ec162f4b1a6917bffeee6b26119217aaef4fbac67ad52f",
22 "Gateway": "172.17.0.1",
23 "GlobalIPv6Address": "",
24 "GlobalIPv6PrefixLen": 0,
25 "IPAddress": "172.17.0.2",
26 "IPPrefixLen": 16,
27 "IPv6Gateway": "",
28 "MacAddress": "02:42:ac:11:00:02",
29 "Networks": {
30 "bridge": {
31 "IPAMConfig": null,
32 "Links": null,
33 "Aliases": null,
34 "NetworkID": "cec09526dffa1d43a80de5d16205a13d4464c10428df7b67dab4dbbf5716e9c8",
35 "EndpointID": "5f46f9da4868be3141ec162f4b1a6917bffeee6b26119217aaef4fbac67ad52f",
36 "Gateway": "172.17.0.1",
37 "IPAddress": "172.17.0.2",
38 "IPPrefixLen": 16,
39 "IPv6Gateway": "",
40 "GlobalIPv6Address": "",
41 "GlobalIPv6PrefixLen": 0,
42 "MacAddress": "02:42:ac:11:00:02",
43 "DriverOpts": null
44 }
45 }
46 }
47 }
48 ]

docker-命令帮助的更多相关文章

  1. Docker命令学习

    今天更换腾讯云系统的时候发现了多了个CoreOS,据说是专门运行docker的轻量系统,顺便学习一下docker命令. 1. docker version 显示 Docker 版本信息. 2. doc ...

  2. Docker命令详解

    Docker命令详解   最近学习Docker,将docker所有命令实验了一番,特整理如下: # docker --help Usage: docker [OPTIONS] COMMAND [arg ...

  3. Docker入门教程(六)另外的15个Docker命令

    Docker入门教程(六)另外的15个Docker命令 [编者的话]DockerOne组织翻译了Flux7的Docker入门教程,本文是系列入门教程的第六篇,继续介绍Docker命令.之前的第二篇文章 ...

  4. 安装Docker和下载images镜像和常用Docker命令

    我的是centos7,也会6的方法: $sudo yum install docker 直接yum安装contos7使用centos6.5先获取epel源并 启动Docker,并注册开机服务 [roo ...

  5. docker命令和后台参数

    Docker官方为了让用户快速了解Docker,提供了一个 交互式教程 ,旨在帮助用户掌握Docker命令行的使用方法. Docker 命令行 下面对Docker的命令清单进行简单的介绍,详细内容在后 ...

  6. 掌握Docker命令

    1.管理镜像命令 获取镜像 docker push ubuntu:14:04 查看镜像列表 docker images 重命名image docker tag IMAGE-NAME NEW-IMAGE ...

  7. docker命令不需要敲sudo的方法

    由于docker daemon需要绑定到主机的Unix socket而不是普通的TCP端口,而Unix socket的属主为root用户,所以其他用户只有在命令前添加sudo选项才能执行相关操作. 如 ...

  8. 从开发到部署会用到的 Docker 命令

    本文的目的是理解容器开发在目标环境中部署的端到端流程,并列出这些操作所需的 Docker 命令.如果有任何Docker问题,请移步到最新最热的技术社区 IT帮 itbang.me 提问,短信通知专家来 ...

  9. docker命令行学习

    docker命令行学习 docker run docker run --help:老实说这条最管用了 docker run -it:交互模式,允许控制台输出 docker run -d:detach, ...

  10. Docker命令查询

    基本语法 docker [OPTIONS] COMMAND [arg...] 一般来说,Docker 命令可以用来管理 daemon,或者通过 CLI 命令管理镜像和容器.可以通过 man docke ...

随机推荐

  1. 为什么要做一款ERP软件——开源软件诞生7

    技术之外的探讨--第7篇 用日志记录“开源软件”的诞生 赤龙ERP开源地址: 点亮星标,感谢支持,与开发者交流 kzca2000 码云:https://gitee.com/redragon/redra ...

  2. java 将本地文件或网络文件与base64互相转换

    一:将网络文件转为Base64 将文件转为base64 public static String fileToBase64(String url){ int byteread = 0; String ...

  3. Linux:正则表达式2

    基础正则表达式 ^ : 以xx开头 $ :以xx结尾 ^$ :代表空行 .   任意一个字符 \   :转义符号,让有着特殊意义的字符可被使用 * :重复0个或多个前面的字符,例如 a* 2表示a后面 ...

  4. Django 多页面间参数传递用session方法(Django七)

    由一个页面跳转至另一个页面可以有render中携带几个参数,如下:照上例便在跳转到homepage页面后使用传递的四个参数了 但问题是如何在由homepage跳转到其他页面时仍可以使用这四个参数呢?我 ...

  5. 掌控安全sql注入靶场pass-05

    1.判断注入点 1 and 1=1 1 and 1=2 考虑存在布尔盲注 布尔盲注解释 当不能像前面那样直接在网页中显示我们要的数据时就需要用到盲注,来得到数据库之类的名字.基于布尔的盲注就是通过判断 ...

  6. 【小白学PyTorch】11 MobileNet详解及PyTorch实现

    文章来自微信公众号[机器学习炼丹术].我是炼丹兄,欢迎加我微信好友交流学习:cyx645016617. @ 目录 1 背景 2 深度可分离卷积 2.2 一般卷积计算量 2.2 深度可分离卷积计算量 2 ...

  7. 第17课 - make 中的路径搜索(上)

    第17课 - make 中的路径搜索(上) 1. 问题 在以往的 make 学习中,我们使用到的 .c 文件和 .h 文件都与 makefile 处在同一个路径.在实际的工程项目中,所有的源文件和头文 ...

  8. [算法]美团春招笔试题C-求有趣子序列数(DP)

    题目 输入n,以及长度为n的数组元素 输出数组的非空子序列中有多少个"有趣序列"mod 998244353,有趣序列指所有元素满足arr[i]%i == 0, i从0记. 例: 输 ...

  9. 串(string)

    题目描述 给定一个由小写字母组成的字符串s,每次你可以删去它的一个非回文子串, 求删成空串的最小次数. 输入输出格式 输入格式: 第一行一个整数 t 表示数据组数. 每组数据第一行一个整数 n表示字符 ...

  10. NX二次开发-NX访问MySQL数据库(增删改查)

    版本:NX11+VS2013+MySQL5.6(x64)+SQLyog 1.新建一个NX项目(多字节) 2.设置VC++目录(调用MySQL的头文件,dll和lib库文件) 3.设置番茄助手 然后重启 ...