<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## 1. 輔助命令: ~~~ #顯示 Docker 版本信息 docker version #顯示 Docker 系統信息,包括鏡像和容器數。 docker info #幫助命令 docker help ~~~ ## 2. Images鏡像命令: #### 搜索鏡像 ~~~ # 從網絡上查找需要的鏡像 docker search 鏡像名稱 ~~~ #### 拉取鏡像 ~~~ # 從Docker的倉庫下載鏡像到本地,鏡像名稱格式為名稱:版本號,如果版本號不指定則是最新的版本。如果不知道鏡像版本,可以去Docker Hub搜索對應鏡像查看即可。 docker pull 鏡像名稱 ~~~ #### 查看鏡像 ~~~ # 查看本地鏡像 docker images # 查看本地所有鏡像 docker images -a # 查看本地鏡像的id docker images -q ~~~ #### 刪除鏡像 ~~~ # 刪除鏡像 -f表示強制刪除 docker rmi [-f] 鏡像id[鏡像名稱] # 刪除所有鏡像 docker rmi -f $(docker images -qa) ~~~ ## 3. Container容器命令: #### 查看運行的容器 ~~~ # 查看正在執行的容器 docker ps # 查看所有的容器 docker ps -a ~~~ #### 創建并啟動容器 ~~~ docker run 參數 #### 參數說明: -i:保持容器運行。通過和-t同時使用。加入-it這兩個參數以后,容器創建后會自動進入容器中,退出容器后,容器會自動關閉。 -t:為容器重新分配一個偽輸入終端,通常和-i同時使用。 -d:以守護(后臺)模式運行容器。創建一個容器在后臺運行,需要使用docker exec 進入容器。 -it:創建的容器一般稱為交互式容器。 -id:創建的容器一般稱為守護式容器、 --name:威創建的容器命名。 -p:映射端口 外部端口:容器內部暴露的端口 ~~~ #### 進入容器 ~~~ docker exec -it 容器id[容器名稱] /bin/bash ~~~ #### 查看容器信息 ~~~ docker inspect 容器id[容器名稱] ~~~ #### 停止容器 ~~~ docker stop 容器id[容器名稱] ~~~ #### 重啟容器 ~~~ docker restart 容器id[容器名稱] ~~~ #### 強制停止容器 ~~~ docker kill 容器id[容器名稱] ~~~ #### 刪除容器 ~~~ # 需要先停止容器,然后再刪除 docker rm 容器id[容器名稱] # 強制刪除容器 docker rm -f 容器id[容器名稱] # 強制刪除所有容器 docker rm -f $(docker ps -qa) ~~~ #### 查看容器日志 ~~~ docker logs -f 容器id[容器名稱] ~~~ ## 4. 常用命令 ~~~bash attach Attach to a running container # 當前 shell 下 attach 連接指定運行鏡像 build Build an im from a Docker registry server # 從當前 Docker registry 退出 logs Fetch the logs of a container # 輸出當前容器日志信息 port Lookup the public-facing port which is NAT-ed to PRIVATE_PORT # 查看映射端口對應的容器內部源端口 pause Pause all processes within a container # 暫停容器 ps List containers # 列出容器列表 pull Pull an image or a repository from the docker registry server # 從docker鏡像源服務器拉取指定鏡像或者庫鏡像 push Push an image or a repository to the docker registry server # 推送指定鏡像或者庫鏡像至docker源服務器 restart 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 # 創建一個新的容器并運行一個命令 save Save an image to a tar archive # 保存一個鏡像為一個 tar 包[對應 load] search Search for an image on the Docker Hub # 在 docker hub 中搜索鏡像 start Start a stopped containers # 啟動容器 stop Stop a running containers # 停止容器 tag Tag an image into a repository # 給源中鏡像打標簽 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 # 截取容器停止時的退出狀態值age from a Dockerfile # 通過 Dockerfile 定制鏡像 commit Create a new image from a container changes # 提交當前容器為新的鏡像 cp Copy files/folders from the containers filesystem to the host path #從容器中拷貝指定文件或者目錄到宿主機中 create Create a new container # 創建一個新的容器,同 run,但不啟動容器 diff Inspect changes on a containers filesystem # 查看 docker 容器變化 events Get real time events from the server # 從 docker 服務獲取容器實時事件 exec Run a command in an existing container # 在已存在的容器上運行命令 export Stream the contents of a container as a tar archive # 導出容器的內容流作為一個 tar 歸檔文件[對應 import ] history Show the history of an image # 展示一個鏡像形成歷史 images List images # 列出系統當前鏡像 import Create a new filesystem image from the contents of a tarball # 從tar包中的內容創建一個新的文件系統映像[對應export] info Display system-wide information # 顯示系統相關信息 inspect Return low-level information on a container # 查看容器詳細信息 kill Kill a running container # kill 指定 docker 容器 load Load an image from a tar archive # 從一個 tar 包中加載一個鏡像[對應 save] login Register or Login to the docker registry server # 注冊或者登陸一個 docker 源服務器 logout Log out ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看