Docker 是一個開源項(xiàng)目,能夠快速地構(gòu)建、測試、發(fā)布分布式應(yīng)用程序。Docker 對象是打包軟件的輕量級獨(dú)立可執(zhí)行包,通過 Docker 可以將應(yīng)用程序的依賴項(xiàng)打包到一起,使應(yīng)用程序在不同的環(huán)境中運(yùn)行的更可靠。
在 Docker 中,使用docker命令來管理容器、鏡像等,其中docker h命令幫助我們查看其它命令的詳細(xì)信息。下面我們來一一了解一下其中的參數(shù):
$ docker h [OPTIONS] COMMAND
OPTIONS:
--help 幫助信息 --verbose, -v 顯示命令的詳細(xì)信息
COMMAND:
attach Attach to a running container build Build an image from a Dockerfile 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 on a container's filesystem events Get real time events from the server exec Run a command in a running container export Export a container's filesystem as a tar archive history Show the history of an image images List images import Import the contents from a tarball to create a filesystem image info Display system-wide information inspect Return low-level information on a container or image kill Kill a running container load Load an image from a tar archive or STDIN login Log in to a Docker registry logout Log out from a Docker registry logs Fetch the logs of a container pause Pause all processes within a container port List port mappings or a specific mapping for the container ps List containers pull Pull an image or a repository from a registry push Push an image or a repository to a registry rename Rename a container restart Restart a container rm Remove one or more containers rmi Remove one or more images run Run a command in a new container save Save one or more images to a tar archive (streamed to STDOUT by default) search Search the Docker Hub for images start Start one or more stopped containers stats Display a live stream of container(s) resource usage statistics stop Stop a running container tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE top Display the running processes of a container unpause Unpause all processes within a container update Update configuration of one or more containers version Show the Docker version information wait Block until a container stops, then print its exit code
通過運(yùn)行docker h XXX
命令,我們可以來了解某一個命令的詳細(xì)信息,例如:docker h run
命令可以查看如何使用docker run命令。
總結(jié):
docker h
命令可以幫助我們了解 Docker 的命令集,它是一個方便使用的命令行接口,旨在幫助使用者更加方便的使用 Docker。