首页 > 其他分享 >【Docker常用命令】docker 或 docker help

【Docker常用命令】docker 或 docker help

时间:2023-11-28 13:04:36浏览次数:46  
标签:container help -- Manage docker Docker more

1、用途:

docker 或 docker help 命令用于要列出docker可用的命令。

docker 【命令】 --help命令用于查看具体本命令的使用帮助。

2、格式

docker 或docker help 或docker --help 或docker -h

3、执行结果

C:\Windows\System32>docker


Usage:  docker [OPTIONS] COMMAND


A self-sufficient runtime for containers


Common Commands:
  run         Create and run a new container from an image
  exec        Execute a command in a running container
  ps          List containers
  build       Build an image from a Dockerfile
  pull        Download an image from a registry
  push        Upload an image to a registry
  images      List images
  login       Log in to a registry
  logout      Log out from a registry
  search      Search Docker Hub for images
  version     Show the Docker version information
  info        Display system-wide information


Management Commands:
  builder     Manage builds
  buildx*     Docker Buildx (Docker Inc., v0.11.2-desktop.5)
  checkpoint  Manage checkpoints
  compose*    Docker Compose (Docker Inc., v2.22.0-desktop.2)
  container   Manage containers
  context     Manage contexts
  dev*        Docker Dev Environments (Docker Inc., v0.1.0)
  extension*  Manages Docker extensions (Docker Inc., v0.2.20)
  image       Manage images
  init*       Creates Docker-related starter files for your project (Docker Inc., v0.1.0-beta.8)
  manifest    Manage Docker image manifests and manifest lists
  network     Manage networks
  plugin      Manage plugins
  sbom*       View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  scan*       Docker Scan (Docker Inc., v0.26.0)
  scout*      Docker Scout (Docker Inc., v1.0.7)
  system      Manage Docker
  trust       Manage trust on Docker images
  volume      Manage volumes


Swarm Commands:
  config      Manage Swarm configs
  node        Manage Swarm nodes
  secret      Manage Swarm secrets
  service     Manage Swarm services
  stack       Manage Swarm stacks
  swarm       Manage Swarm


Commands:
  attach      Attach local standard input, output, and error streams to a running container
  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
  export      Export a container's filesystem as a tar archive
  history     Show the history of an image
  import      Import the contents from a tarball to create a filesystem image
  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
  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
  rename      Rename a container
  restart     Restart one or more containers
  rm          Remove one or more containers
  rmi         Remove one or more images
  save        Save one or more images to a tar archive (streamed to STDOUT by default)
  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
  wait        Block until one or more containers stop, then print their exit codes


Global Options:
      --config string      Location of client config files (
                           default "C:\\Users\\<<user>>\\.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 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
                           "C:\\Users\\<<user>>\\.docker\\ca.pem")
      --tlscert string     Path to TLS certificate file (default
                           "C:\\Users\\<<user>>\\.docker\\cert.pem")
      --tlskey string      Path to TLS key file (default
                           "C:\\Users\\<<user>>\\.docker\\key.pem")
      --tlsverify          Use TLS and verify the remote
  -v, --version            Print version information and quit


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


For more help on how to use Docker, head to https://docs.docker.com/go/guides/

4、docker命令概要

docker命令主要有镜像命令、容器命令、启动类命令、其他(如帮助类等)命令

镜像命令常用如下

docker build:从 Dockerfile 和上下文构建镜像

docker images :列出本地的镜像信息。

docker pull :拉取 Docker 镜像。

docker push:上传镜像。

docker search:在 Docker Hub 搜索镜像。

docker commit:创建镜像。

docker load:导入镜像。

docker rmi:删除镜像。

docker save:导出镜像。

docker tag:为镜像打标签。

【Docker常用命令】docker 或 docker help_docker




标签:container,help,--,Manage,docker,Docker,more
From: https://blog.51cto.com/u_64214/8599007

相关文章

  • 二、Docker 安装
    1.环境提前说明1.1CentOSDocker安装Docker支持以下的CentOS版本:CentOS7(64-bit)CentOS6.5(64-bit)或更高的版本1.2前提条件目前,CentOS仅发行版本中的内核支持Docker。Docker运行在CentOS7上,要求系统为64位、系统内核版本为3.10以上。Docker运行在CentOS......
  • angie rocky docker 镜像问题 二
    我以前说过关于angierockydocker镜像的问题,今天官方已经修复了,修复方法与我介绍的是类似的参考官方修复方案通过dive工具查看到的 nginx参考资料https://github.com/webserver-llc/angie/issues/54......
  • docker部署halo
    一、docker dockerpullhalohub/halo:1.5.4dockerrun-it-d--namehalo-p8090:8090-v~/.halo:/root/.halo--restart=unless-stoppedhalohub/halo:1.5.4 二、docker-composeversion:'3'services:halohub:hostname:halohubimage:halo......
  • docker部署HomeAssistant
    一、docker部署sudodockerrun-d--name="homeassistant-v1"-v/docker/home-assistant/config:/config-p8123:8123homeassistant/home-assistant:latest二、docker-compose部署version:'3'services:homeassistant:hostname:homeassistant......
  • docker镜像操作
    docker镜像操作[root@hecs-74102~]#dockerimage--helpUsage:dockerimageCOMMANDManageimagesCommands:buildBuildanimagefromaDockerfilehistoryShowthehistoryofanimageimportImportthecontentsfromatarballtocreatea......
  • 容器技术在CentOS 7中的实践:Docker与Kubernetes的整合与优化
    容器技术在CentOS7中的实践:Docker与Kubernetes的整合与优化在当今的软件开发和部署领域,容器技术已经成为一种不可或缺的工具。在Linux系统中,特别是CentOS7上,Docker和Kubernetes是两个广泛使用的容器相关工具。本文将深入探讨在CentOS7中如何实践容器技术,包括Docker的基本使用......
  • Dockerfile讲解
    (Dockerfile)dockerfile是用来构建docker镜像的文本文件,是由一条条构建镜像所需的指令和参数构成的脚本。dockerfile定义了进程需要的一切东西,涉及的内容包括执行代码或者是文件、环境变量、依赖包、运行时环境、动态链接库、操作系统的发行版、服务进程和内核进程(当应用进程需要......
  • Docker命令
    帮助启动类命令启动docker:systemctlstartdocker停止docker:systemctlstopdocker重启docker:systemctlrestartdocker查看docker状态:systemctlstatusdocker开机启动:systemctlenabledocker查看docker概要信息:dockerinfo查看docker总体帮助文档:docker--h......
  • 迁移备份、Dockerfile、docker私有仓库
    迁移备份#镜像从哪来的?1dockerpull拉的2通过容器打包成镜像3Dockerfile构建#容器保存为镜像-运行一个centos容器dockerrun-id--namecentos_vimcentos:7-在容器中装vimdockerexec-ita6e240/bin/bashyumins......
  • docker 创建的gitlab怎么修改ssh端口以及地址
    首先进入容器中dockerexec-tigitlab/bin/bash然后执行修改配置的命令vi/opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml 修改这三个地方的值然后执行一下gitlab-ctlrestart重启一下gitlab即可 ......