docker run [可选参数] 镜像名或镜像ID docker container run [可选参数] 镜像名或镜像ID ‘’‘ -i:表示运行容器 -t:表示容器启动后会进入其命令行。加入这两个参数后,容器创建就能登录进去。即分配一个伪终端。 --name :为创建的容器命名。 -v:表示目录映射关系(前者是宿主机目录,后者是映射到宿主机上...
$docker rm $(docker ps -a -q) # 删除单个容器; -f, --force=false; -l, --link=false Remove the specified link and not the underlying container; -v, --volumes=false Remove the volumes associated to the container $docker rm Name/ID # 停止、启动、杀死一个容器 $docker stop Name/ID $...
none模式: 创建时 docker run --network none 代表禁用网络功能,只有localhost能访问 container: 创建时 docker run --network container:容器Id Docker 服务默认会创建一个 docker0 网桥(其上有一个 docker0 内部接口),该桥接网络的名称为docker0,它在内核层连通了其他的物理或虚拟网卡,这就将所有容器和本地主机...
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 export Export a container's filesystem as a tar archive history Show the history...
exec # Run a commandina running container#在已存在的容器上运行命令export# Export a containers filesystemasa tar archive#导出容器的内容流作为一个tar归档文件(对应import)history # Show the historyofan image #展示一个镜像形成历史 inspect # 查看容器详细信息 ...
export Export a container's filesystem as a tar archive history Show the history of ...
events Get realtimeevents from the serverexecRun acommandin a running containerexportExport a container's filesystem as a tar archivehistory Show the history of an imageimages List imagesimport Import the contents from a tarball to create a filesystem imageinfo Display system-wide informationinspect...
BUILDKIT_PROGRESSSet type of progress output (auto,plain,tty,rawjson) whenbuildingwithBuildKit backend. Use plain to show container output (defaultauto). Because Docker is developed using Go, you can also use any environment variables used by the Go runtime. In particular, you may find these ...
commit Create a new image from a container's changes ... 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 可以看到Docker的命令非常多,现在Docker官方已经将Docker命令分组了,当前...
top Lookup the running processes of a container 查看容器中运行的进程信息 unpause Unpause a paused container 取消暂停容器 version Show the docker version information 查看 docker 版本号 wait Block until a container stops, then print its exit code 截取容器停止时的退出状态值...