1. 查看版本

    docker version

    1. Client: Docker Engine - Community (client docker引擎标识)
    2. Version: 20.10.12 (docker版本)
    3. API version: 1.41 (api版本)
    4. Go version: go1.16.12(go语言版本)
    5. Git commit: e91ed57(git的那次提交)
    6. Built: Mon Dec 13 11:45:41 2021(构建日期)
    7. OS/Arch: linux/amd64
    8. Context: default(内容默认)
    9. Experimental: true
    10. Server: Docker Engine - Community (server docker引擎标识)
    11. Engine:
    12. Version: 20.10.12
    13. API version: 1.41 (minimum version 1.12)
    14. Go version: go1.16.12
    15. Git commit: 459d0df
    16. Built: Mon Dec 13 11:44:05 2021
    17. OS/Arch: linux/amd64
    18. Experimental: false
    19. containerd: (docker容器)
    20. Version: 1.4.12(版本)
    21. GitCommit: 7b11cfaabd73bb80907dd23182b9347b4245eb5d
    22. runc:
    23. Version: 1.0.2
    24. GitCommit: v1.0.2-0-g52b36a2
    25. docker-init:
    26. Version: 0.19.0
    27. GitCommit: de40ad0
    1. 详细信息

    docker info

    Client:(client标识)
     Context:    default
     Debug Mode: false
     Plugins:
      app: Docker App (Docker Inc., v0.9.1-beta3)
      buildx: Docker Buildx (Docker Inc., v0.7.1-docker)
      scan: Docker Scan (Docker Inc., v0.12.0)
    
    Server: (server标识)
     Containers: 1(容器数量)
      Running: 0(正在运行的容器数量)
      Paused: 0(暂停运行的数量)
      Stopped: 1(停止运行的数量)
     Images: 1(镜像的数量)
     Server Version: 20.10.12
     Storage Driver: overlay2
      Backing Filesystem: xfs
      Supports d_type: true
      Native Overlay Diff: true
      userxattr: false
     Logging Driver: json-file(日志驱动)
     Cgroup Driver: cgroupfs
     Cgroup Version: 1
     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: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
     Default Runtime: runc
     Init Binary: docker-init
     containerd version: 7b11cfaabd73bb80907dd23182b9347b4245eb5d
     runc version: v1.0.2-0-g52b36a2
     init version: de40ad0
     Security Options:
      seccomp
       Profile: default
     Kernel Version: 3.10.0-1160.49.1.el7.x86_64(系统内核版本)
     Operating System: CentOS Linux 7 (Core)(操作系统版本)
     OSType: linux(操作系统类型)
     Architecture: x86_64
     CPUs: 1(占用cpu核数)
     Total Memory: 1.795GiB(占用内存)
     Name: localhost.localdomain
     ID: FJXQ:2VY2:4L5B:SRVE:QNDR:7LQ3:YNJ5:52HE:FAMC:QNHD:6WPM:EJYG
     Docker Root Dir: /var/lib/docker
     Debug Mode: false
     Registry: https://index.docker.io/v1/(docker 注册地址)
     Labels:
     Experimental: false
     Insecure Registries:
      127.0.0.0/8
     Registry Mirrors:
      https://hgnfwtds.mirror.aliyuncs.com/(挂着的阿里云镜像加速器)
     Live Restore Enabled: false
    
    1. 帮助

    docker —help

    Usage:  docker [OPTIONS] COMMAND(docker命令公式 划重点!!!)
    
    A self-sufficient runtime for containers
    
    Options:([OPTIONS]再划重点!!!可选参数)
          --config string      (客户端配置文件的位置)(default "/root/.docker")
      -c, --context string     (overrides DOCKER_HOST env var and default context set with "docker context use")
      -D, --debug              (启用调试模式)
      -H, --host list          (连接的主机列表守护程序套接字)
      -l, --log-level string  (设置日志级别)("debug"|"info"|"warn"|"error"|"fatal") (default "info")
          --tls                (使用tls) implied by --tlsverify
          --tlscacert string  (信任证书仅由该CA签名)(default "/root/.docker/ca.pem")
          --tlscert string     (tls证书文件的路径)(default "/root/.docker/cert.pem")
          --tlskey string      (tls秘钥文件的路径) (default "/root/.docker/key.pem")
          --tlsverify          (使用tls并验证原创)
      -v, --version            (打印版本信息)
    
    Management Commands:(再划重点!!!管理命令)
      app*        Docker App (Docker Inc., v0.9.1-beta3)
      builder     Manage builds(管理生成)
      buildx*     Docker Buildx (Docker Inc., v0.7.1-docker)
      config      Manage Docker configs(guanli )(管理docker配置)
      container   Manage containers(管理docker容器)
      context     Manage contexts
      image       Manage images(管理docker镜像)
      manifest    Manage Docker image manifests and manifest lists
      network     Manage networks(管理docker网络)
      node        Manage Swarm nodes(管理docker群节点)
      plugin      Manage plugins(管理docker插件)
      scan*       Docker Scan (Docker Inc., v0.12.0)
      secret      Manage Docker secrets(管理docker秘钥)
      service     Manage services(管理docker服务)
      stack       Manage Docker stacks(管理docker堆栈)
      swarm       Manage Swarm(管理docker群组)
      system      Manage Docker(docker系统管理员)
      trust       Manage trust on Docker images(管理对docker镜像信任)
      volume      Manage volumes(管理卷)
    
    Commands:(docker命令)
      attach      (将本地标准输入输出和错误流附加到正在运行的容器)Attach local standard input, output, and error streams to a running container
      build       (从dockerfile构建镜像)Build an image from a Dockerfile
      commit      (根据容器的更改创建新镜像)Create a new image from a containers 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 containers filesystem
      events      (从服务器获取实时事件) Get real time events from the server
      exec        (在正在运行的容器中运行命令)Run a command in a running container
      export      (将容器的文件系统导出为tar存档)Export a containers filesystem as a tar archive
      history     (显示镜像的历史)Show the history of an image
      images      (镜像列表)List images
      import      (从tarball导入内容以创建文件系统镜像)Import the contents from a tarball to create a filesystem image
      info        (显示系统范围的信息)Display system-wide information
      inspect     (返回docker对象的下级信息)Return low-level information on Docker objects
      kill        (杀死一个或多个正在运行的容器)Kill one or more running containers
      load        (加载从tar存档到stdin加载镜像)Load an image from a tar archive or STDIN
      login       (登录到docker注册表)Log in to a Docker registry
      logout      (从docker注册表注销)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        (保存一个或多个镜像到tar存档)Save one or more images to a tar archive (streamed to STDOUT by default)
      search      (在docker Hub中搜索镜像)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     (显示docker的版本信息)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.
    
    To get more help with docker, check out our guides at https://docs.docker.com/go/guides/