docker常用命令大全

本文提供了一份详尽的Docker命令指南,包括版本查看、系统信息、镜像管理、容器操作、网络管理等核心功能的命令介绍,是Docker初学者及使用者的必备参考资料。

 

1.docker version   
Show the Docker version information
显示Docker版本信息

2.docker info      
Display system-wide information
显示整个系统的信息

3.docker --help
帮助

4.docker pull      
Pull an image or a repository from a registry
从注册表中提取映像或存储库
    
5.docker push      
Push an image or a repository to a registry
将映像或存储库推入注册表
    
6.docker rename    
Rename a container
容器重命名
    
7.docker restart   
Restart a container
重启一个容器
    
8.docker rm        
Remove one or more containers
删除一个或多个容器
    
9.docker rmi       
Remove one or more images
删除一个或多个镜像
    
10.docker run       
Run a command in a new container
运行容器

11.docker start     
Start one or more stopped containers
启动一个或多个停止的容器

12.docker images    
List images
镜像列表

13.docker history   
Show the history of an image
显示镜像的历史

14.docker attach    
Attach to a running container
附加到正在运行的容器上

15.docker build     
Build an image from a Dockerfile
从Dockerfile构建一个映像
    
16.docker commit    
Create a new image from a container's changes
从容器的更改中创建一个新映像
    
17.docker cp        
Copy files/folders between a container and the local filesystem
在容器和本地文件系统之间复制文件/文件夹
    
18.docker create    
Create a new container
创建一个新容器
    
19.docker diff      
Inspect changes on a container's filesystem
检查容器文件系统上的更改
    
20.docker events    
Get real time events from the server
从服务器获取实时事件
    
21.docker exec      
Run a command in a running container
在正在运行的容器中运行命令

22.docker export    
Export a container's filesystem as a tar archive
将容器的文件系统导出为tar存档文件
    
23.docker import    
Import the contents from a tarball to create a filesystem image
从tarball导入内容以创建文件系统映像

24.docker inspect   
Return low-level information on a container, image or task
返回容器、映像或任务的底层信息
    
25.docker kill      
Kill one or more running containers
杀死一个或多个正在运行的容器
    
26.docker load      
Load an image from a tar archive or STDIN
从tar存档或STDIN加载映像
    
27.docker login     
Log in to a Docker registry.
登录到Docker注册表
    
28.docker logout    
Log out from a Docker registry.
从Docker注册表注销
    
29.docker logs      
Fetch the logs of a container
获取容器的日志
    
30.docker network   
Manage Docker networks 
docker网络管理
    
31.docker node     
Manage Docker Swarm nodes 
Docker群节点管理
    
32.pause     
Pause all processes within one or more containers
暂停一个或多个容器中的所有进程
    
33.docker port      
List port mappings or a specific mapping for the container
列出容器的端口映射或特定映射
    
34.docker ps        
List containers
列出本地容器
    
35.docker save      
Save one or more images to a tar archive (streamed to STDOUT by default)
将一个或多个镜像保存到tar存档文件(默认情况下流到STDOUT)
    
36.docker search    
Search the Docker Hub for images
在Docker Hub中搜索镜像
    
37.docker service   
Manage Docker services 
Docker服务管理
    
38.docker stats     
Display a live stream of container(s) resource usage statistics
显示容器资源使用统计数据的实时流
    
39.docker stop      
Stop one or more running containers
停止一个或多个正在运行的容器
    
40.docker swarm     
Manage Docker Swarm Docker
集群管理
    
41.docker tag       
Tag an image into a repository
将镜像标记到存储库中
    
42.docker top       
Display the running processes of a container
显示容器的运行进程
    
43.docker unpause   
Unpause all processes within one or more containers
在一个或多个容器中暂停所有进程
    
44.docker update    
Update configuration of one or more containers
更新一个或多个容器的配置
    
45.docker volume    
Manage Docker volumes Docker
容量管理
    
46.docker wait      
Block until a container stops, then print its exit code
阻塞,直到容器停止,然后打印其退出代码

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值