[root@adsryen ~]# dockerUsage:docker [OPTIONS] COMMANDAself-sufficientruntimeforcontainersOptions:--configstringLocationofclientconfigfiles (default "/root/.docker")-c,--contextstringNameofthecontexttousetoconnecttothedaemon (overrides DOCKER_HOSTenvvaranddefaultcontextsetwith"docker context use")-D,--debugEnabledebugmode-H,--hostlistDaemonsocket(s) toconnectto-l,--log-levelstringSetthelogginglevel ("debug"|"info"|"warn"|"error"|"fatal") (default"info")--tlsUseTLS; impliedby--tlsverify--tlscacertstringTrustcertssignedonlybythisCA (default "/root/.docker/ca.pem")--tlscertstringPathtoTLScertificatefile (default "/root/.docker/cert.pem")--tlskeystringPathtoTLSkeyfile (default "/root/.docker/key.pem")--tlsverifyUseTLSandverifytheremote-v,--versionPrintversioninformationandquitManagementCommands:builderManagebuildsconfigManageDockerconfigscontainerManagecontainerscontextManagecontextsengineManagethedockerengineimageManageimagesnetworkManagenetworksnodeManageSwarmnodespluginManagepluginssecretManageDockersecretsserviceManageservicesstackManageDockerstacksswarmManageSwarmsystemManageDockertrustManagetrustonDockerimagesvolumeManagevolumesCommands:attachAttachlocalstandardinput,output,anderrorstreamstoarunningcontainerbuildBuildanimagefromaDockerfilecommitCreateanewimagefromacontainer's changes 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'sfilesystemeventsGetrealtimeeventsfromtheserverexecRunacommandinarunningcontainerexport 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 Docker objects kill Kill one or more running containers 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 one or more containers 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 one or more containers 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 one or more running containers tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE top Display the running processes of a container unpause Unpause all processes within one or more containers 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 codesRun 'docker COMMAND --help' for more information on a command.
如果你输入 docker 提示 command not found ,说明服务器很可能并没有安装 Docker 环境,下面就教你如何一步一步安装 Docker 环境!
[root@adsryen ~]# dockerUsage:docker [OPTIONS] COMMANDAself-sufficientruntimeforcontainersOptions:--configstringLocationofclientconfigfiles (default "/root/.docker")-c,--contextstringNameofthecontexttousetoconnecttothedaemon (overrides DOCKER_HOSTenvvaranddefaultcontextsetwith"docker context use")-D,--debugEnabledebugmode-H,--hostlistDaemonsocket(s) toconnectto-l,--log-levelstringSetthelogginglevel ("debug"|"info"|"warn"|"error"|"fatal") (default"info")--tlsUseTLS; impliedby--tlsverify--tlscacertstringTrustcertssignedonlybythisCA (default "/root/.docker/ca.pem")--tlscertstringPathtoTLScertificatefile (default "/root/.docker/cert.pem")--tlskeystringPathtoTLSkeyfile (default "/root/.docker/key.pem")--tlsverifyUseTLSandverifytheremote-v,--versionPrintversioninformationandquitManagementCommands:builderManagebuildsconfigManageDockerconfigscontainerManagecontainerscontextManagecontextsengineManagethedockerengineimageManageimagesnetworkManagenetworksnodeManageSwarmnodespluginManagepluginssecretManageDockersecretsserviceManageservicesstackManageDockerstacksswarmManageSwarmsystemManageDockertrustManagetrustonDockerimagesvolumeManagevolumesCommands:attachAttachlocalstandardinput,output,anderrorstreamstoarunningcontainerbuildBuildanimagefromaDockerfilecommitCreateanewimagefromacontainer's changes 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'sfilesystemeventsGetrealtimeeventsfromtheserverexecRunacommandinarunningcontainerexport 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 Docker objects kill Kill one or more running containers 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 one or more containers 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 one or more containers 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 one or more running containers tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE top Display the running processes of a container unpause Unpause all processes within one or more containers 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 codesRun 'docker COMMAND --help' for more information on a command.
Commands:attachAttachlocalstandardinput,output,anderrorstreamstoarunningcontainerbuildBuildanimagefromaDockerfilecommitCreateanewimagefromacontainer's changes 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'sfilesystemeventsGetrealtimeeventsfromtheserverexecRunacommandinarunningcontainerexport 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 Docker objects kill Kill one or more running containers 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 one or more containers 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 one or more containers 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 one or more running containers tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE top Display the running processes of a container unpause Unpause all processes within one or more containers 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 run 和 docker version 命令吧!
docker run : Run a command in a new container
表示在新的容器内运行命令,翻译成生活语言就是在集装箱内做着不可告人的神秘操作!
docker version : Show the Docker version information
显示 Docker 版本信息,还记得 docker --version 吗?
忘记了的话,往上翻翻看,--version 的描述是 Print version information and quit ,是一种更加简单的版本信息.
[root@adsryen ~]# dockerUsage:docker [OPTIONS] COMMANDAself-sufficientruntimeforcontainersOptions:--configstringLocationofclientconfigfiles (default"/root/.docker")-c,--contextstringNameofthecontexttousetoconnecttothedaemon (overrides DOCKER_HOSTenvvaranddefaultcontextsetwith"docker context use")-D,--debugEnabledebugmode-H,--hostlistDaemonsocket(s) toconnectto-l,--log-levelstringSetthelogginglevel ("debug"|"info"|"warn"|"error"|"fatal") (default"info")--tlsUseTLS; impliedby--tlsverify--tlscacertstringTrustcertssignedonlybythisCA (default"/root/.docker/ca.pem")--tlscertstringPathtoTLScertificatefile (default"/root/.docker/cert.pem")--tlskeystringPathtoTLSkeyfile (default"/root/.docker/key.pem")--tlsverifyUseTLSandverifytheremote-v,--versionPrintversioninformationandquitManagementCommands:builderManagebuildsconfigManageDockerconfigscontainerManagecontainerscontextManagecontextsengineManagethedockerengineimageManageimagesnetworkManagenetworksnodeManageSwarmnodespluginManagepluginssecretManageDockersecretsserviceManageservicesstackManageDockerstacksswarmManageSwarmsystemManageDockertrustManagetrustonDockerimagesvolumeManagevolumesCommands:attachAttachlocalstandardinput,output,anderrorstreamstoarunningcontainerbuildBuildanimagefromaDockerfilecommitCreateanewimagefromacontainer's changes 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'sfilesystemeventsGetrealtimeeventsfromtheserverexecRunacommandinarunningcontainerexport 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 Docker objects kill Kill one or more running containers 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 one or more containers 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 one or more containers 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 one or more running containers tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE top Display the running processes of a container unpause Unpause all processes within one or more containers 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 codesRun 'docker COMMAND --help' for more information on a command.