Docker基本命令(1)

简介: Docker基本命令(1)
[root@localhost ~]# docker
Usage:  docker [OPTIONS] COMMAND
A self-sufficient runtime for containers
Options:
      --config string      Location of client config files (default "/root/.docker")
  -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      #管理容器 
  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
## docker 兼容了新旧的使用格式 建议使用分组管理.
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.
相关文章
|
存储 Java Linux
【Docker】(2)还在浏览网页寻找Docker命令?本文全面列举与使用Docker里的各个命令!想要什么命令直接从本文拿!
docker有着比VM更少的抽象层 由于Docker不需要Hypervisor实现硬件资源虚拟化,运行在Docker容器上的程序直接使用的都是实际物理机的硬件资源 因此在CPU、内存利用率上Docker将会在效率上有明显优势 docker利用的时宿主机的内核,而不需要加载操作系统OS内核 当新建一个容器时,Docker不需要和虚拟机一样重新加载一个操作系统内核 进而避免引寻、加载操作系统内核返回等比较费时费资源的过程,当新建一个虚拟机时,虚拟机软件需要加载OS,返回新建过程时分钟级别的。 而Docker由于直接利用宿主机的操作系统,则省略了返回过程,因此新建一个Docker容器只需
1109 124
|
安全 Unix Linux
Docker中授权普通用户使用docker命令以及解决无权限访问/var/run/docker.sock错误。
通过上述步骤,可以有效解决普通用户无法使用Docker命令的问题,同时处理 `/var/run/docker.sock`权限错误。这样的设置不仅方便用户使用Docker提供的各项服务,同时还能保护系统的安全性。在进行此类配置更改时,请确保理解每一步骤的作用及潜在的安全风险,尤其是在修改文件权限时。在实际的操作中,始终应该努力保持系统的最低必要权限,避免过度放宽权限,这是保障系统安全的一个重要方针。
4436 75
|
Docker 容器
Docker run命令-p参数详解
本文介绍Docker端口映射的基础用法。通过`docker run -p <宿主机端口>:<容器端口>`实现端口映射,例如`-p 5000:80`将宿主机5000端口映射到容器80端口,外部访问宿主机5000端口时流量会转发至容器内部的80端口。示例命令中,`-d`用于后台运行,`--restart=always`确保容器自动重启,`--name`指定容器名称。部署完成后可通过`http://服务器IP地址:5000`验证服务是否正常运行。
1705 57
|
网络协议 Ubuntu Docker
Docker Compose--命令说明
Docker Compose--命令说明
2579 30
|
NoSQL 关系型数据库 MySQL
《docker高级篇(大厂进阶):4.Docker网络》包括:是什么、常用基本命令、能干嘛、网络模式、docker平台架构图解
《docker高级篇(大厂进阶):4.Docker网络》包括:是什么、常用基本命令、能干嘛、网络模式、docker平台架构图解
755 56
《docker高级篇(大厂进阶):4.Docker网络》包括:是什么、常用基本命令、能干嘛、网络模式、docker平台架构图解
|
监控 NoSQL 时序数据库
《docker高级篇(大厂进阶):7.Docker容器监控之CAdvisor+InfluxDB+Granfana》包括:原生命令、是什么、compose容器编排,一套带走
《docker高级篇(大厂进阶):7.Docker容器监控之CAdvisor+InfluxDB+Granfana》包括:原生命令、是什么、compose容器编排,一套带走
937 78
|
Ubuntu Linux 开发者
常用的Docker命令:docker_cmd_sheet
以上就是一些常用的Docker命令,希望能帮助你更好地驾驭这个强大的工具。记住,Docker就像是一个魔法咒语,只有真正理解和熟练使用,才能发挥出它的最大魔力。
340 22
|
Shell 应用服务中间件 nginx
docker 镜像的部分常用命令
docker镜像常用命令
547 16
|
关系型数据库 MySQL Docker
|
Java 应用服务中间件 Linux
【Docker容器化技术】docker安装与部署、常用命令、容器数据卷、应用部署实战、Dockerfile、服务编排docker-compose、私有仓库
本文主要讲解了Docker的安装与部署、常用命令、容器数据卷、应用部署实战、Dockerfile、服务编排docker-compose、私有仓库以及Docker容器虚拟化与传统虚拟机比较。
15536 37
【Docker容器化技术】docker安装与部署、常用命令、容器数据卷、应用部署实战、Dockerfile、服务编排docker-compose、私有仓库

热门文章

最新文章