While the image used by a container is not an identifier for the container, you find out the IDs of containers using an image by using the --filter flag. For example, the following docker ps command gets the IDs of all running containers based on the nginx:alpine image: ...
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...
run Run a commandinanewcontainer save Save oneormore imagestoa tar archive (streamedtoSTDOUTbydefault) search Search the Docker Hubforimages start Start oneormore stopped containers stats Display a live streamofcontainer(s) resource usage statisticsstopStoponeormore running containers tag Create a t...
[root@master~]# dockerUsage:dockerCOMMANDAself-sufficient runtimeforcontainersOptions:--config string Locationofclient configfiles(default"/root/.docker")-D,--debug Enable debug mode--help Print usage-H,--host list Daemonsocket(s)to connectto(default[])-l,--log-level string Set the loggingle...
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 ima...
acommandin an existing container#在已存在的容器上运行命令exportStresm the contents of a container as atar archive#导出容器的内容流作为一个 tar 归档文件[对应 import]history Show the history of an image#展示一个镜像形成历史imagesListimages#列出系统当前镜像import Create a new filesystem image from ...
Restart a running container # 重启运行的容器 rm Remove one or more containers # 移除一个或者多个容器 rmi Remove one or more images # 移除一个或多个镜像[无容器使用该镜像才可删除,否则需删除相关容器才可继续或 -f 强制删除] run Run a command in a new container # 创建一个新的容器并运行一个...
Now, rerun the docker ps command to see a list of running containers. $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES Stop, start, and name containers You can start, stop, and restart Docker containers. When you stop a container, it's not removed, but the status is ...
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 ...
containers filesystem # 检查容器创建以来文件系统上文件或目录的更改 exec Run a command in a running container # 从正在运行的容器中执行命令 export Export a containers filesystem as a tar archive # 将容器文件系统导出为归档文件 inspect Display detailed information on one or more containers # 显示...