五月综合激情婷婷六月,日韩欧美国产一区不卡,他扒开我内裤强吻我下面视频 ,无套内射无矿码免费看黄,天天躁,日日躁,狠狠躁

新聞動態(tài)

ubuntu20.04 LTS安裝docker的方法步驟

發(fā)布日期:2022-02-04 14:30 | 文章來源:腳本之家

零:卸載舊版本

Docker 的舊版本被稱為 docker,docker.io 或 docker-engine 。如果已安裝,請卸載它們:

$ sudo apt-get remove docker docker-engine docker.io containerd runc

當前稱為 Docker Engine-Community 軟件包 docker-ce 。

一:設置倉庫

在新主機上首次安裝 Docker Engine-Community 之前,需要設置 Docker 倉庫。之后,您可以從倉庫安裝和更新 Docker 。

更新 apt 包索引。

$ sudo apt-get update

安裝 apt 依賴包,用于通過HTTPS來獲取倉庫:

$ sudo apt-get install \
 apt-transport-https \
 ca-certificates \
 curl \
 gnupg-agent \
 software-properties-common

添加 Docker 的官方 GPG 密鑰:

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

9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 通過搜索指紋的后8個字符,驗證您現(xiàn)在是否擁有帶有指紋的密鑰。

$ sudo apt-key fingerprint 0EBFCD88
 
pub rsa4096 2017-02-22 [SCEA]
  9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid   [ unknown] Docker Release (CE deb) <docker@docker.com>
sub rsa4096 2017-02-22 [S]

使用以下指令設置穩(wěn)定版?zhèn)}庫

注意:目前 20.04 還沒有國內 docker 源,暫時用 18.04 版本。

$ sudo add-apt-repository \
 "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
 bionic \
 stable"

二:安裝 Docker Engine-Community

更新 apt 包索引。

$ sudo apt-get update

安裝最新版本的 Docker Engine-Community 和 containerd

$ sudo apt-get install docker-ce docker-ce-cli containerd.io

三:測試

輸入

$ sudo docker run hello-world

如果docker和你問好——或者說出現(xiàn)類似以下輸出

Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete     Digest: sha256:c3b4ada4687bbaa170745b3e4dd8ac3f194ca95b2d0518b417fb47e5879d9b5f
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

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/get-started/

就說明安裝完事了。

四:免sudo運行&鏡像加速

免sudo

參考如下方法將用戶添加到docke組

$ sudo usermod -aG docker [你的用戶名]

重啟docker

$ sudo systemctl restart docker

(然而我的機器上發(fā)生了很詭異的事——我重啟docker服務后依然不能以普通用戶啟動docker。重啟機器后才能免sudo運行。)

docker鏡像加速

我用了阿里云的免費加速

https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors

后續(xù)設置按照阿里云網(wǎng)頁內提示即可,不再贅述。

五:參考鏈接

-Windows10 安裝 WSL2 Ubuntu20.04 并設置 docker 環(huán)境
-Ubuntu Docker 安裝

到此這篇關于ubuntu20.04 LTS安裝docker的方法步驟的文章就介紹到這了,更多相關ubuntu20.04 LTS安裝docker內容請搜索本站以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持本站!

香港服務器租用

版權聲明:本站文章來源標注為YINGSOO的內容版權均為本站所有,歡迎引用、轉載,請保持原文完整并注明來源及原文鏈接。禁止復制或仿造本網(wǎng)站,禁止在非maisonbaluchon.cn所屬的服務器上建立鏡像,否則將依法追究法律責任。本站部分內容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學習參考,不代表本站立場,如有內容涉嫌侵權,請聯(lián)系alex-e#qq.com處理。

實時開通

自選配置、實時開通

免備案

全球線路精選!

全天候客戶服務

7x24全年不間斷在線

專屬顧問服務

1對1客戶咨詢顧問

在線
客服

在線客服:7*24小時在線

客服
熱線

400-630-3752
7*24小時客服服務熱線

關注
微信

關注官方微信
頂部