加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

docker基础:管理命令

发布时间:2020-12-16 03:15:35 所属栏目:安全 来源:网络整理
导读:Blog:博客园 个人 目录 管理命令 管理网络 管理容器 管理服务 管理节点 管理插件 管理命令 docker network :管理网络; docker container :管理容器; docker service :管理服务; docker node :管理Swarm节点; docker plugin :管理插件; docker sta

Blog:博客园 个人

目录
  • 管理命令
    • 管理网络
    • 管理容器
    • 管理服务
    • 管理节点
    • 管理插件

管理命令

  • docker network:管理网络;
  • docker container:管理容器;
  • docker service:管理服务;
  • docker node:管理Swarm节点;
  • docker plugin:管理插件;
  • docker stack:管理堆栈;
  • docker system:管理系统信息;
  • docker swarm:管理Swarm集群;
  • docker volume:管理卷;

管理网络

语法如下:

docker network COMMAND

Commands:
  connect     Connect a container to a network
  create      Create a network
  disconnect  Disconnect a container from a network
  inspect     Display detailed information on one or more networks
  ls          List networks
  prune       Remove all unused networks
  rm          Remove one or more networks

管理容器

语法如下:

docker container COMMAND

Commands:
  attach      Attach 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
  exec        Run a command in a running container
  export      Export a container's filesystem as a tar archive
  inspect     Display detailed information on one or more containers
  kill        Kill one or more running containers
  logs        Fetch the logs of a container
  ls          List containers
  pause       Pause all processes within one or more containers
  port        List port mappings or a specific mapping for the container
  prune       Remove all stopped containers
  rename      Rename a container
  restart     Restart one or more containers
  rm          Remove one or more containers
  run         Run a command in a new container
  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
  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

管理服务

语法如下:

docker service COMMAND

Commands:
  create      Create a new service
  inspect     Display detailed information on one or more services
  ls          List services
  ps          List the tasks of a service
  rm          Remove one or more services
  scale       Scale one or multiple replicated services
  update      Update a service

管理节点

语法如下:

docker node COMMAND

Commands:
  demote      Demote one or more nodes from manager in the swarm
  inspect     Display detailed information on one or more nodes
  ls          List nodes in the swarm
  promote     Promote one or more nodes to manager in the swarm
  ps          List tasks running on one or more nodes,defaults to current node
  rm          Remove one or more nodes from the swarm
  update      Update a node

管理插件

语法如下:

docker plugin COMMAND

Commands:
  create      Create a plugin from a rootfs and configuration. Plugin data directory must contain config.json and rootfs directory.
  disable     Disable a plugin
  enable      Enable a plugin
  inspect     Display detailed information on one or more plugins
  install     Install a plugin
  ls          List plugins
  push        Push a plugin to a registry
  rm          Remove one or more plugins
  set         Change settings for a plugin
  upgrade     Upgrade an existing plugin

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读