docker 帮助命令

 [root@centos7-1 ~]# ps -ef|grep docker

root      5287     1  0 03:24 ?        00:00:04 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

root      8353  5287  0 03:25 ?        00:00:00 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 6379 -container-ip 172.17.0.2 -container-port 6379

root      8367  5287  0 03:25 ?        00:00:00 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 3306 -container-ip 172.17.0.3 -container-port 3306

root      8394  5283  0 03:25 ?        00:00:00 containerd-shim -namespace moby -workdir /var/lib/containerd/io.containerd.runtime.v1.linux/moby/edd3648e27321444fac6b7c8ec9f9c69ffb1c853f2e25d63b3f43d1a95759915 -address /run/containerd/containerd.sock -containerd-binary /usr/bin/containerd -runtime-root /var/run/docker/runtime-runc

root      8439  5283  0 03:25 ?        00:00:00 containerd-shim -namespace moby -workdir /var/lib/containerd/io.containerd.runtime.v1.linux/moby/e896badf322054ec1770073e0630ad1ff0fc0be1b81968da912eb54bca9bc091 -address /run/containerd/containerd.sock -containerd-binary /usr/bin/containerd -runtime-root /var/run/docker/runtime-runc

root     32311 32248  0 07:57 pts/1    00:00:00 grep --color=auto docker

[root@centos7-1 ~]# ps -ef|grep docker

root      5287     1  0 03:24 ?        00:00:04 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

root      8353  5287  0 03:25 ?        00:00:00 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 6379 -container-ip 172.17.0.2 -container-

root      8367  5287  0 03:25 ?        00:00:00 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 3306 -container-ip 172.17.0.3 -container-

root      8394  5283  0 03:25 ?        00:00:00 containerd-shim -namespace moby -workdir /var/lib/containerd/io.containerd.runtime.v1.linux/moby/edd3625d63b3f43d1a95759915 -address /run/containerd/containerd.sock -containerd-binary /usr/bin/containerd -runtime-root /var/run/docker/runtime-runc

root      8439  5283  0 03:25 ?        00:00:00 containerd-shim -namespace moby -workdir /var/lib/containerd/io.containerd.runtime.v1.linux/moby/e896b968da912eb54bca9bc091 -address /run/containerd/containerd.sock -containerd-binary /usr/bin/containerd -runtime-root /var/run/docker/runtime-runc

root     32343 32248  0 07:57 pts/1    00:00:00 grep --color=auto docker

[root@centos7-1 ~]# docker run hello-world

Unable to find image 'hello-world:latest' locally

latest: Pulling from library/hello-world

0e03bdcc26d7: Pull complete 

Digest: sha256:49a1c8800c94df04e9658809b006fd8a686cab8028d33cfba2cc049724254202

Status: Downloaded newer image for hello-world:latest

 

Hello from Docker!

This message shows that your installation appears to be working correctly.

 

To generate this message, Docker took the following steps:

 1. The Docker client contacted the Docker daemon.

 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.

    (amd64)

 3. The Docker daemon created a new container from that image which runs the

    executable that produces the output you are currently reading.

 4. The Docker daemon streamed that output to the Docker client, which sent it

    to your terminal.

 

To try something more ambitious, you can run an Ubuntu container with:

 $ docker run -it ubuntu bash

 

Share images, automate workflows, and more with a free Docker ID:

 https://hub.docker.com/

 

For more examples and ideas, visit:

 https://docs.docker.com/get-started/

 

[root@centos7-1 ~]# docker version

Client: Docker Engine - Community

 Version:           19.03.11

 API version:       1.40

 Go version:        go1.13.10

 Git commit:        42e35e61f3

 Built:             Mon Jun  1 09:13:48 2020

 OS/Arch:           linux/amd64

 Experimental:      false

 

Server: Docker Engine - Community

 Engine:

  Version:          19.03.11

  API version:      1.40 (minimum version 1.12)

  Go version:       go1.13.10

  Git commit:       42e35e61f3

  Built:            Mon Jun  1 09:12:26 2020

  OS/Arch:          linux/amd64

  Experimental:     false

 containerd:

  Version:          1.2.13

  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429

 runc:

  Version:          1.0.0-rc10

  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd

 docker-init:

  Version:          0.18.0

  GitCommit:        fec3683

[root@centos7-1 ~]# docker info

Client:

 Debug Mode: false

 

Server:

 Containers: 3

  Running: 2

  Paused: 0

  Stopped: 1

 Images: 3

 Server Version: 19.03.11

 Storage Driver: overlay2

  Backing Filesystem: xfs

  Supports d_type: true

  Native Overlay Diff: true

 Logging Driver: json-file

 Cgroup Driver: cgroupfs

 Plugins:

  Volume: local

  Network: bridge host ipvlan macvlan null overlay

  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog

 Swarm: inactive

 Runtimes: runc

 Default Runtime: runc

 Init Binary: docker-init

 containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429

 runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd

 init version: fec3683

 Security Options:

  seccomp

   Profile: default

 Kernel Version: 3.10.0-957.el7.x86_64

 Operating System: CentOS Linux 7 (Core)

 OSType: linux

 Architecture: x86_64

 CPUs: 1

 Total Memory: 1.795GiB

 Name: centos7-1

 ID: KW3Z:H7CM:ADKB:FBKL:PMC7:GCMA:L4ZN:XG72:DJU2:EJXJ:MRNL:6INP

 Docker Root Dir: /var/lib/docker

 Debug Mode: false

 Registry: https://index.docker.io/v1/

 Labels:

 Experimental: false

 Insecure Registries:

  127.0.0.0/8

 Registry Mirrors:

  https://5f2jam6c.mirror.aliyuncs.com/

  http://hub-mirror.c.163.com/

 Live Restore Enabled: false

 

[root@centos7-1 ~]# docker --help

 

Usage: docker [OPTIONS] COMMAND

 

A self-sufficient runtime for containers

 

Options:

      --config string      Location of client config files (default "/root/.docker")

  -c, --context string     Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with

                           "docker context use")

  -D, --debug              Enable debug mode

  -H, --host list          Daemon socket(s) to connect to

  -l, --log-level string   Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")

      --tls                Use TLS; implied by --tlsverify

      --tlscacert string   Trust certs signed only by this CA (default "/root/.docker/ca.pem")

      --tlscert string     Path to TLS certificate file (default "/root/.docker/cert.pem")

      --tlskey string      Path to TLS key file (default "/root/.docker/key.pem")

      --tlsverify          Use TLS and verify the remote

  -v, --version            Print version information and quit

 

Management Commands:

  builder     Manage builds

  config      Manage Docker configs

  container   Manage containers

  context     Manage contexts

  engine      Manage the docker engine

  image       Manage images

  network     Manage networks

  node        Manage Swarm nodes

  plugin      Manage plugins

  secret      Manage Docker secrets

  service     Manage services

  stack       Manage Docker stacks

  swarm       Manage Swarm

  system      Manage Docker

  trust       Manage trust on Docker images

  volume      Manage volumes

 

Commands:

  attach      Attach local standard input, output, and error streams to a running container

  build       Build an image from a Dockerfile

  commit      Create a new image from a container's changes

  cp          Copy files/folders between a container and the local filesystem

  create      Create a new container

  diff        Inspect changes to files or directories on a container's filesystem

  events      Get real time events from the server

  exec        Run a command in a running container

  export      Export a container's filesystem as a tar archive

  history     Show the history of an image

  images      List images

  import      Import the contents from a tarball to create a filesystem image

  info        Display system-wide information

  inspect     Return low-level information on Docker objects

  kill        Kill one or more running containers

  load        Load an image from a tar archive or STDIN

  login       Log in to a Docker registry

  logout      Log out from a Docker registry

  logs        Fetch the logs of a container

  pause       Pause all processes within one or more containers

  port        List port mappings or a specific mapping for the container

  ps          List containers

  pull        Pull an image or a repository from a registry

  push        Push an image or a repository to a registry

  rename      Rename a container

  restart     Restart one or more containers

  rm          Remove one or more containers

  rmi         Remove one or more images

  run         Run a command in a new container

  save        Save one or more images to a tar archive (streamed to STDOUT by default)

  search      Search the Docker Hub for images

  start       Start one or more stopped containers

  stats       Display a live stream of container(s) resource usage statistics

  stop        Stop one or more running containers

  tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE

  top         Display the running processes of a container

  unpause     Unpause all processes within one or more containers

  update      Update configuration of one or more containers

  version     Show the Docker version information

  wait        Block until one or more containers stop, then print their exit codes

 

Run 'docker COMMAND --help' for more information on a command.

[root@centos7-1 ~]# man ls

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值