开心六月综合激情婷婷|欧美精品成人动漫二区|国产中文字幕综合色|亚洲人在线成视频

    1. 
      
        <b id="zqfy3"><legend id="zqfy3"><fieldset id="zqfy3"></fieldset></legend></b>
          <ul id="zqfy3"></ul>
          <blockquote id="zqfy3"><strong id="zqfy3"><dfn id="zqfy3"></dfn></strong></blockquote>
          <blockquote id="zqfy3"><legend id="zqfy3"></legend></blockquote>
          打開APP
          userphoto
          未登錄

          開通VIP,暢享免費電子書等14項超值服

          開通VIP
          最簡單的教程:在Ubuntu操作系統(tǒng)里安裝Docker

          Docker 是一個開源的應用容器引擎,讓開發(fā)者可以打包他們的應用以及依賴包到一個可移植的容器中,然后發(fā)布到任何流行的 Linux 機器上,也可以實現(xiàn)虛擬化。容器是完全使用沙箱機制,相互之間不會有任何接口。

          今天這篇文章咱們就來將Docker安裝到Ubuntu上。

          1. 由于Ubuntu里apt官方庫里的docker版本可能比較低,因此先用下面的命令行卸載舊版本(如果有的話)

          sudo apt-get remove docker docker-engine docker-ce docker.io

          2. 更新apt包索引:

          sudo apt-get update

          3. 執(zhí)行下列命令行,使apt可以通過HTTPS協(xié)議去使用存儲庫:

          sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common

          4. 添加Docker官方提供的GPG密鑰:

          curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

          什么是GPG密鑰呢?大家可以從阮一峰老師的博客:GPG入門教程里獲得答案:

          1991年,程序員Phil Zimmermann為了避開政府監(jiān)視,開發(fā)了加密軟件PGP。這個軟件非常好用,迅速流傳開來,成了許多程序員的必備工具。但是,它是商業(yè)軟件,不能自由使用。所以,自由軟件基金會決定,開發(fā)一個PGP的替代品,取名為GnuPG。這就是GPG的由來。

          上面的文字出自阮一峰老師的博客鏈接:http://www.ruanyifeng.com/blog/2013/07/gpg.html

          5. 設(shè)置stable存儲庫:

          sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu$(lsb_release -cs) stable"

          最后再次更新apt包索引:

          6. 安裝最新版本的docker-ce:

          sudo apt-get install -y docker-ce

          安裝完畢后,可以看到Docker服務已經(jīng)從/lib/systemd/system/docker.service啟動了,dockerd進程id為4921:

          命令行ps -aux查看進程id為4921的進程路徑:/usr/bin/dockerd -H fd://

          使用命令sudo docker version可以查看安裝docker的版本:

          使用命令sudo docker run hello-world,能觀察到從遠程下載這個測試用的容器:Pulling from library/hello-world:

          然后看到打印消息:Hello from Docker! 說明Docker安裝成功。

          To generate this message, Docker took the following steps:

          1. The Docker client contacted the Docker daemon.

          2. The Docker daemon pulled the "hello-world" image from the Docker Hub.

          (amd64)

          3. The Docker daemon created a new container from that image which runs the

          executable that produces the output you are currently reading.

          4. The Docker daemon streamed that output to the Docker client, which sent it

          to your terminal.

          To try something more ambitious, you can run an Ubuntu container with:

          $ docker run -it ubuntu bash

          Share images, automate workflows, and more with a free Docker ID:

          https://hub.docker.com/

          For more examples and ideas, visit:

          https://docs.docker.com/engine/userguide/

          要獲取更多Jerry的原創(chuàng)技術(shù)文章,請關(guān)注公眾號"汪子熙"

          本站僅提供存儲服務,所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊舉報。
          打開APP,閱讀全文并永久保存 查看更多類似文章
          猜你喜歡
          類似文章
          Docker學習筆記 — Docker安裝(Ubuntu 64bit)
          OpenHarmony源碼編譯全過程
          Ubuntu20.04 LTS國內(nèi)源安裝指定版本Docker/docker
          如何在 Ubuntu Linux 上安裝 Docker 教程
          win10利用WSL2安裝docker的2種方式
          蘋果M1芯片上借助Linux虛擬機搭建Docker環(huán)境
          更多類似文章 >>
          生活服務
          分享 收藏 導長圖 關(guān)注 下載文章
          綁定賬號成功
          后續(xù)可登錄賬號暢享VIP特權(quán)!
          如果VIP功能使用有故障,
          可點擊這里聯(lián)系客服!

          聯(lián)系客服