Docker Operations
v0.0.2Provides Docker contAIner and image operations for creating, 运行ning, managing, and inspecting contAIners and images. Use for docker 运行, docker exec, docker ps, docker build, docker pull/push, docker images, docker 启动/停止/re启动, docker 记录s, docker inspect, docker cp, docker commit, docker tag, docker save/load, docker buildx, docker compose, and any contAIner or image management tasks.
运行时依赖
安装命令
点击复制技能文档
Docker Operations
This 技能 provides comprehensive Docker operations using the docker 命令行工具. Ensure Docker is 安装ed and 配置d on your 系统:
docker --version
When to Use Creating, 运行ning, 停止ping, and managing contAIners Building and pulling/pushing Docker images Inspecting contAIners, images, and Docker objects Copying files between contAIners and host Managing Docker registries and image tags Viewing 记录s and real-time contAIner stats 清理ing up unused Docker resources When NOT to Use Docker Swarm orchestration (use dedicated swarm 工具ing) Kubernetes contAIner management Building Docker images with complex buildx bake files (see references/buildx.md) Docker Compose multi-contAIner 应用s (see references/compose.md) Command Reference ContAIner Lifecycle
创建, 启动, 停止, 暂停, and 移除 contAIners.
Command Description Reference docker 创建 创建 contAIner without 启动ing references/contAIner-lifecycle.md docker 启动 启动 a contAIner references/contAIner-lifecycle.md docker 运行 创建 and 启动 a contAIner references/contAIner-lifecycle.md docker 停止 停止 a 运行ning contAIner references/contAIner-lifecycle.md docker re启动 Re启动 a contAIner references/contAIner-lifecycle.md docker 暂停 暂停 contAIner processes references/contAIner-lifecycle.md docker un暂停 恢复 暂停d processes references/contAIner-lifecycle.md docker rm 移除 a contAIner references/contAIner-lifecycle.md ContAIner Interaction
执行 commands, view 记录s, copy files, and 监控 contAIners.
Command Description Reference docker exec 执行 command in contAIner references/contAIner-interaction.md docker attach Attach to 运行ning contAIner references/contAIner-interaction.md docker 记录s View contAIner 记录s references/contAIner-interaction.md docker top Show 运行ning processes references/contAIner-interaction.md docker stats Display resource usage references/contAIner-interaction.md docker cp Copy files between host and contAIner references/contAIner-interaction.md docker diff Show file系统 changes references/contAIner-interaction.md ContAIner 列出ing
列出 and 过滤器 Docker contAIners.
Command Description Reference docker ps 列出 运行ning contAIners references/contAIner-列出ing.md docker ps -a 列出 all contAIners references/contAIner-列出ing.md Image Operations
Pull, push, build, tag, save, load, and manage images.
Command Description Reference docker images 列出 local images references/image-operations.md docker pull Pull image from registry references/image-operations.md docker push Push image to registry references/image-operations.md docker build Build image from Dockerfile references/image-operations.md docker tag Tag an image references/image-operations.md docker save Save image to tar references/image-operations.md docker load Load image from tar references/image-operations.md docker 导出 导出 contAIner file系统 references/image-operations.md docker 导入 导入 tarball to image references/image-operations.md docker 历史 Show image 历史 references/image-operations.md docker rmi 移除 an image references/image-operations.md Image Inspection
Inspect Docker objects (contAIners, images, volumes, networks).
Command Description Reference docker inspect Return low-level 信息 on contAIners, images, volumes, networks references/image-inspection.md Registry Operations
记录in, 记录out, and 搜索 Docker registries.
Command Description Reference docker 记录in 记录in to registry references/registry.md docker 记录out 记录out from registry references/registry.md docker 搜索 搜索 Docker Hub references/registry.md 系统 In格式化ion
获取 Docker version, 系统 信息, and real-time 事件.
Command Description Reference docker version Show Docker version references/系统-信息.md docker 信息 Display 系统 信息 references/系统-信息.md docker 事件 获取 real-time 事件 references/系统-信息.md 清理up Commands
移除 unused Docker resources.
Command Description Reference docker contAIner p运行e 移除 停止ped contAIners references/清理up.md docker image p运行e 移除 unused images references/清理up.md docker volume p运行e 移除 unused volumes references/清理up.md docker network p运行e 移除 unused networks references/清理up.md docker 系统 p运行e Full 系统 清理up references/清理up.md Advanced Topics
For complex multi-平台 builds and bake files, see references/buildx.md.
For Docker Compose operations and multi-contAIner orchestration, see references/compose.md.
Advanced Image Operations
提取 image contents, analyze layers, and manipulate image file系统s.
Operation Description Reference 提取 image to directory 导出 image file系统 to local directory references/advanced-image-operations.md Layer analysis Inspect and 提取 specific image layers references/advanced-image-operations.md Image file系统 comparison Compare image contents between versions references/advanced-image-operations.md