詳細介紹Ubuntu 16.04系統環境安裝Docker CE容器的過程

因爲項目的須要,咱們在不少軟件配置環境中須要用到Docker容器,這個時候咱們能夠用本身的VPS主機搭建。在這篇文章中,筆者將會利用Ubuntu 16.04系統環境安裝Docker CE容器的過程。若是咱們有網友須要安裝的也能夠參考這篇文章進行。由於都是親自測試的,能夠確保教程的真實性。html

第1、系統安裝linux

這裏我會用到Ubuntu 16.04,因此我在服務器中安裝Ubuntu 16.04 64位版本。docker

詳細介紹Ubuntu 16.04系統環境安裝Docker CE容器的過程

第2、升級最新版本源ubuntu

一、刪除舊版本docker服務器

sudo apt-get remove docker docker-engine docker.iocurl

二、升級最新源post

apt-get update -y測試

三、安裝必要的軟件包url

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

四、添加 Docker 官方的 GPG key

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

提示OK表示沒有問題。

五、添加穩定版源

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

六、再次更新源

apt-get update -y

第3、安裝安裝 Docker CE社區版

apt-get install docker-ce -y

檢測是否成功

第4、檢測是否成功

docker run hello-world

檢測是否成功

若是咱們看到上圖所示的Hello from Docker!,那就說明安裝成功。

本文來自:https://www.52banwagong.com/190.html

相關文章
相關標籤/搜索