日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Ubuntu >内容正文

Ubuntu

Ubuntu16.04 安装 docker

發布時間:2023/12/10 Ubuntu 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Ubuntu16.04 安装 docker 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

安裝docker首先要需要一臺宿主機, 我目前用VMvare下安裝的Ubuntu16.04系統為宿主機,進行docker安裝測試。

ubuntu安裝時選的中文環境,生成的sources.list里面的源url主要是:cn.archive.ubuntu.com,這個可以從國內服務器下載一些信息,相對較快。

目前最新docker分為 docker-ce和docker-ee兩個版本,其中ce為社區版免費的,ee為商業版商用的,目前測試用ce版本。

主要安裝過程參考官方文檔步驟,如下:

1、首次更新ubuntu

$ sudo apt-get update

2、安裝linux-image-extra-*?包,這一步不可少,不然后面安裝docker會從國外網址下載,一般被墻的下載不了, 也就安裝不成功

$ sudo apt-get install \linux-image-extra-$(uname -r) \linux-image-extra-virtual

3、安裝https

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

4、安裝GPG key

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

5、驗證 key的 fingerprint 為?9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88.

$ sudo apt-key fingerprint 0EBFCD88

上面命令輸出信息為:

pub 4096R/0EBFCD88 2017-02-22Key fingerprint = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 uid Docker Release (CE deb) <docker@docker.com> sub 4096R/F273FCD8 2017-02-22

6、安裝倉庫

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

7、再次更新

$ sudo apt-get update

8、安裝docker-ce,這一步我沒有用國內源,所以下載很慢,下次發國內源的安裝

$ sudo apt-get install docker-ce

9、上面執行完畢,docker應該算是安裝完畢了,可以輸入下面命令測試是否成功

$ sudo docker run hello-world

如果成功,則輸出如下信息:

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.3. The Docker daemon created a new container from that image which runs theexecutable that produces the output you are currently reading.4. The Docker daemon streamed that output to the Docker client, which sent itto your terminal.To try something more ambitious, you can run an Ubuntu container with:$ docker run -it ubuntu bashShare images, automate workflows, and more with a free Docker ID:https://cloud.docker.com/For more examples and ideas, visit:https://docs.docker.com/engine/userguide/

?

至此, docker的安裝算是完成了,下面文章將創建容器并搭建jdk-tomcat-mysql的WEB運行環境。

轉載于:https://www.cnblogs.com/windy-love/p/7059907.html

總結

以上是生活随笔為你收集整理的Ubuntu16.04 安装 docker的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。