三句話介紹:html
Docker是一個開源的應用容器引擎,使用GO語言開發,基於Linux內核的cgroup,namespace,Union FS等技術,對應用程序進行封裝隔離,而且獨立於宿主機與其餘進程,這種運行時封裝的狀態稱爲容器python
Docker早起版本實現時基於LXC,並進一步對其進行封裝,包括文件系統,網絡互聯,鏡像管理等諸多方面進行了改進,極大的簡化了容器管理。從0.7版本之後開始去掉了LXC,轉爲自行研發的libcontainer,從1.11版本開始,進一步演進爲使用runC和containerd。linux
Docker的主要目標是「Build,Ship and Run Any App,Anywhere」,即經過對應用組件的封裝,分發,部署,運行等生命週期的管理,達到應用組件級別的「一次封裝,屢次分發,處處部署".git
四點總結:web
4點歸納:docker
快速的交付和部署:使用docker,開發人員可使用鏡像來快速構建一套標準的開發環境;開發完成以後,測試和運維人員能夠直接使用相同環境來部署代碼。docker能夠快速建立and刪除容器,實現快速迭代,大量節約開發,測試,部署的時間,而且,各個步驟都有明確的配置和操做,整個過程可見,使團隊更容易理解應用的建立和工做過程。apache
高效的利用資源:docker容器的運行不須要額外的虛擬化管理程序支持,只須要內核級別的虛擬化,能夠實現更高的性能,同時對資源的額外需求很低。ubuntu
輕鬆的遷移和擴展:幾乎能夠在任何平臺之上運行,包括物理機,虛擬機,公有云,私有云,我的電腦等。這種兼容性可以讓用戶在不一樣平臺之間輕鬆地遷移應用。bash
簡單的更新管理:使用Dockerfile,只須要修改配置,就能夠替代之外大量的更新工做。而且全部的修改都以增量的方式進行分發和更新,從而實現自動化而且高效的容器管理。服務器
下表是docker容器與傳統虛擬機的特性比較
docker的設計目標:
1.提供簡單的應用程序打包工具
2.開發人員和運維人員職責邏輯分離。(開發人員側重點是如何使用docker部署應用程序,運維側重點則是若是管理容器)
3.多環境保持一致性,消除了環境差別
C/S框架。Docker後臺進程負責建立,運行和發佈Docker容器。Docker客戶端和後臺進程能夠運行在同一臺機器上,也能夠運行在不一樣的機器上,docker客戶端經過sockets或者REST API與後臺進程通信。
Containerd:是一個簡單的守護進程,使用runC管理容器。向DockerEngine提供接口。
Shim:負責管理一個容器。
runC:是一個輕量級的工具,只用來運行容器。
下圖爲docker的層級結構
1.clinet執行build,pull,run命令發送到DOCKER_HOST
2.DOCKER_HOST 的守護進程(docker_engine)建立容器
3.拉取鏡像的時候,先從本地拉取,若是本地沒有,回去鏡像倉庫拉取鏡像
docker客戶端是許多docker用戶與docker進行交互的主要方式,是Docker最基本的用戶接口,當使用docker run之類的命令時,客戶端將這些命令發送到dockerd,dockerd執行這些命令。docker命令使用Docker API。另外,docker客戶端能夠與多個守護進程進行通訊。
docker的守護進程如上圖所示,dockerd監聽Docker API請求並管理對象(鏡像,容器,網絡和卷)。守護進程還能夠與其餘守護進程通訊來管理docker鼓舞
docker鏡像相似於虛擬機鏡像,能夠將它理解爲一個面向Docker引擎的只讀模板,包含文件系統。
一個鏡像能夠包含一個完整的Ubuntu操做系統環境,能夠把它稱爲一個Ubuntu鏡像。鏡像也能夠安裝apache應用程序,能夠把它稱爲一個Apache鏡像。
鏡像時建立Docker 容器的基礎,經過版本管理和增量的文件系統,Docker提供了一套十分簡單的機制來建立和更新現有的鏡像,用戶甚至能夠從網上下載一個已經作好的應用鏡像,並經過簡單的命令就能夠直接使用。
docker倉庫相似於代碼倉庫,是docker集中存放鏡像文件的場所。
在這裏說明一點,docker倉庫和註冊服務器不能混爲一談,註冊服務器是存放倉庫的地方,上面存放着多個倉庫,每一個倉庫集中存放某一類鏡像,每每包括多個鏡像文件,經過不一樣的標籤(tag)來進行區分。
docker倉庫根據所存儲的鏡像公開與否,Docker倉庫能夠分爲公開倉庫(Public)和私有倉庫(Private)兩種形式。
docker容器相似於一個輕量的沙箱,Docker利用容器來運行和隔離應用。
容器時從鏡像建立的應用運行實例,能夠將其啓動,開始,中止,刪除,而這些容器都是相互隔離,互不可見的。
咱們能夠把容器看作時一個簡易版的linux系統環境(包括root用戶權限,進程空間,用戶空間和網絡空間等),以及運行在其中的應用程序打包而成的應用盒子。
鏡像自身時只讀的。容器從鏡像啓動的時候,Docker會在鏡像的最上層建立一個可寫層,若是須要安裝軟件,命令之類的會安裝到可寫成,可是鏡像自己將保持不變。
Docker 註冊中心存儲 Docker 鏡像。Docker Hub 和 Docker Cloud 是任何人均可以使用的公共註冊中心,而且 Docker 默認配置爲在 Docker Hub 上查找鏡像。你甚至能夠運行你本身的私人註冊中心。若是您使用 Docker Datacenter(DDC),它包括 Docker Trusted Registry(DTR)。
當您使用 docker pull
或 docker run
命令時,所需的鏡像將從配置的註冊中心中提取。當您使用 docker push
命令時,您的鏡像將被推送到您配置的註冊中心。
docker商店容許購買和銷售 Docker 鏡像或免費發佈。例如,您能夠購買包含來自軟件供應商的應用程序或服務的 Docker 鏡像,並使用該鏡像將應用程序部署到您的測試,臨時和生產環境中。您能夠經過拉取新版本的鏡像並從新部署容器來升級應用程序。
https://www.cnblogs.com/ylqh/p/10599831.html
虛擬化是一種資源管理技術,是將計算機的各類實體資源,如服務器,網絡,內存以及存儲等,予以抽象,轉換後呈現出來,打破實體結構間的不可切割的障礙,使得用戶能夠用比本來的組態更好的方式來應用這些資源。
基於軟件的虛擬化從對象所在的層次,又能夠分爲應用虛擬化和平臺虛擬化(一般虛擬機技術即屬於這個範疇)。其中,前者通常指的是一些模擬設備或者Wine這樣的軟件,後者能夠分爲一下幾個子類:
徹底虛擬化:虛擬機模擬完整底層硬件環境和特權指令的執行過程,客戶操做系統無需進行更改。例如:vmware workstation ,VirtualBox,QEMU。
硬件輔助虛擬化:利用硬件(主要是cpu)輔助支持處理敏感指令來實現徹底虛擬化的功能,客戶操做系統無需更改,例如:vmware workstation/
部分虛擬化:只針對部分硬件資源進行虛擬化,客戶操做系統須要進行修改,如今有些虛擬化技術的早起版本僅僅支持部分虛擬化
超虛擬化:部分硬件接口以軟件的形式提供給客戶機操做系統,客戶操做系統須要進行修改,例如早起的Xen
操做系統級虛擬化:內核經過建立多個虛擬的操做系統實例(內核和庫)來隔離不一樣的進程。容器相關的技術是這個範疇。例如:docker
docker虛擬化與傳統虛擬化的不一樣之處:
應用程序打包和發佈
應用程序隔離
持續集成
部署微服務
快速搭建測試環境
提供PaaS產品(平臺即服務)
首先咱們要明確docker ce和docker ee的區別,docker ce是社區版本,docker ee 是商業版本,咱們通常用docker ce版本足夠了。
依據ubuntu16.04爲例:
root@S1:~# apt-get update Get:1 http://mirrors.cloud.aliyuncs.com/ubuntu xenial InRelease [247 kB] Get:2 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates InRelease [109 kB] Get:3 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security InRelease [109 kB] Get:4 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/main Sources [868 kB] Get:5 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/universe Sources [7,728 kB] Get:6 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/main amd64 Packages [1,201 kB] Get:7 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/main i386 Packages [1,196 kB] Get:8 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/main Translation-en [568 kB] Get:9 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/universe amd64 Packages [7,532 kB] Get:10 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/universe i386 Packages [7,512 kB] Get:11 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/universe Translation-en [4,354 kB] Get:12 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main Sources [332 kB] Get:13 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/universe Sources [252 kB] Get:14 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main amd64 Packages [925 kB] Get:15 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main i386 Packages [807 kB] Get:16 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main Translation-en [372 kB] Get:17 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/universe amd64 Packages [740 kB] Get:18 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/universe i386 Packages [678 kB] Get:19 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/universe Translation-en [307 kB] Get:20 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/main Sources [144 kB] Get:21 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/universe Sources [103 kB] Get:22 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/main amd64 Packages [626 kB] Get:23 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/main i386 Packages [524 kB] Get:24 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/main Translation-en [259 kB] Get:25 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/universe amd64 Packages [430 kB] Get:26 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/universe i386 Packages [374 kB] Get:27 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/universe Translation-en [173 kB] Fetched 38.5 MB in 6s (5,753 kB/s) Reading package lists... Done
安裝apt-transport-https等軟件包支持https協議的源:
root@S1:~# apt-get install apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common Reading package lists... Done Building dependency tree Reading state information... Done ca-certificates is already the newest version (20170717~16.04.2). curl is already the newest version (7.47.0-1ubuntu2.12). The following package was automatically installed and is no longer required: libopts25 Use 'apt autoremove' to remove it. The following additional packages will be installed: libassuan0 libnpth0 pinentry-curses python3-pycurl python3-software-properties unattended-upgrades Suggested packages: pinentry-doc libcurl4-gnutls-dev python-pycurl-doc python3-pycurl-dbg bsd-mailx The following NEW packages will be installed: gnupg-agent libassuan0 libnpth0 pinentry-curses python3-pycurl python3-software-properties software-properties-common unattended-upgrades The following packages will be upgraded: apt-transport-https upgraded, 8 newly installed, 0 to remove and 28 not upgraded. Need to get 445 kB of archives. After this operation, 2,001 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main amd64 apt-transport-https amd64 1.2.31 [26.6 kB] Get:2 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/main amd64 libassuan0 amd64 2.4.2-2 [34.6 kB] Get:3 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/main amd64 pinentry-curses amd64 0.9.7-3 [31.2 kB] Get:4 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/main amd64 libnpth0 amd64 1.2-3 [7,998 B] Get:5 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main amd64 gnupg-agent amd64 2.1.11-6ubuntu2.1 [240 kB] Get:6 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/main amd64 python3-pycurl amd64 7.43.0-1ubuntu1 [42.3 kB] Get:7 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main amd64 python3-software-properties all 0.96.20.8 [20.2 kB] Get:8 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main amd64 software-properties-common all 0.96.20.8 [9,440 B] Get:9 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main amd64 unattended-upgrades all 0.90ubuntu0.10 [32.3 kB] Fetched 445 kB in 0s (937 kB/s) Preconfiguring packages ... (Reading database ... 100364 files and directories currently installed.) Preparing to unpack .../apt-transport-https_1.2.31_amd64.deb ... Unpacking apt-transport-https (1.2.31) over (1.2.29ubuntu0.1) ... Selecting previously unselected package libassuan0:amd64. Preparing to unpack .../libassuan0_2.4.2-2_amd64.deb ... Unpacking libassuan0:amd64 (2.4.2-2) ... Selecting previously unselected package pinentry-curses. Preparing to unpack .../pinentry-curses_0.9.7-3_amd64.deb ... Unpacking pinentry-curses (0.9.7-3) ... Selecting previously unselected package libnpth0:amd64. Preparing to unpack .../libnpth0_1.2-3_amd64.deb ... Unpacking libnpth0:amd64 (1.2-3) ... Selecting previously unselected package gnupg-agent. Preparing to unpack .../gnupg-agent_2.1.11-6ubuntu2.1_amd64.deb ... Unpacking gnupg-agent (2.1.11-6ubuntu2.1) ... Selecting previously unselected package python3-pycurl. Preparing to unpack .../python3-pycurl_7.43.0-1ubuntu1_amd64.deb ... Unpacking python3-pycurl (7.43.0-1ubuntu1) ... Selecting previously unselected package python3-software-properties. Preparing to unpack .../python3-software-properties_0.96.20.8_all.deb ... Unpacking python3-software-properties (0.96.20.8) ... Selecting previously unselected package software-properties-common. Preparing to unpack .../software-properties-common_0.96.20.8_all.deb ... Unpacking software-properties-common (0.96.20.8) ... Selecting previously unselected package unattended-upgrades. Preparing to unpack .../unattended-upgrades_0.90ubuntu0.10_all.deb ... Unpacking unattended-upgrades (0.90ubuntu0.10) ... Processing triggers for libc-bin (2.23-0ubuntu11) ... Processing triggers for man-db (2.7.5-1) ... Processing triggers for dbus (1.10.6-1ubuntu3.3) ... Processing triggers for systemd (229-4ubuntu21.16) ... Processing triggers for ureadahead (0.100.0-19) ... Setting up apt-transport-https (1.2.31) ... Setting up libassuan0:amd64 (2.4.2-2) ... Setting up pinentry-curses (0.9.7-3) ... Setting up libnpth0:amd64 (1.2-3) ... Setting up gnupg-agent (2.1.11-6ubuntu2.1) ... Setting up python3-pycurl (7.43.0-1ubuntu1) ... Setting up python3-software-properties (0.96.20.8) ... Setting up software-properties-common (0.96.20.8) ... Setting up unattended-upgrades (0.90ubuntu0.10) ... Creating config file /etc/apt/apt.conf.d/50unattended-upgrades with new version Synchronizing state of unattended-upgrades.service with SysV init with /lib/systemd/systemd-sysv-install... Executing /lib/systemd/systemd-sysv-install enable unattended-upgrades Processing triggers for libc-bin (2.23-0ubuntu11) ... Processing triggers for dbus (1.10.6-1ubuntu3.3) ... Processing triggers for systemd (229-4ubuntu21.16) ... Processing triggers for ureadahead (0.100.0-19) ... #添加源的gpg密鑰 root@S1:~# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo: unable to resolve host S1 OK
#確認導入指紋爲「9DC8...CD88」的GPG公鑰 root@S1:~# apt-key fingerprint 0EBFCD88 pub 4096R/0EBFCD88 2017-02-22 Key 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 #添加Docker穩定版的官方軟件源,非xenial版本的系統注意修改成本身對應的代號 root@S1:~# add-apt-repository \ > "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ > $(lsb_release -cs) \ > stable" root@S1:~# apt-get update Hit:1 http://mirrors.cloud.aliyuncs.com/ubuntu xenial InRelease Hit:2 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates InRelease Hit:3 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security InRelease Get:4 https://download.docker.com/linux/ubuntu xenial InRelease [66.2 kB] Get:5 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages [7,361 B] Fetched 73.6 kB in 1s (38.0 kB/s) Reading package lists... Done
安裝docker社區版
root@S1:~# apt-get install docker-ce docker-ce-cli containerd.io Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: libopts25 Use 'apt autoremove' to remove it. The following additional packages will be installed: aufs-tools cgroupfs-mount git git-man liberror-perl libltdl7 pigz Suggested packages: mountall git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch git-cvs git-mediawiki git-svn The following NEW packages will be installed: aufs-tools cgroupfs-mount containerd.io docker-ce docker-ce-cli git git-man liberror-perl libltdl7 pigz upgraded, 10 newly installed, 0 to remove and 28 not upgraded. Need to get 54.4 MB of archives. After this operation, 269 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/universe amd64 pigz amd64 2.3.1-2 [61.1 kB] Get:2 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/universe amd64 aufs-tools amd64 1:3.2+20130722-1.1ubuntu1 [92.9 kB] Get:3 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/universe amd64 cgroupfs-mount all 1.2 [4,970 B] Get:4 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/main amd64 liberror-perl all 0.17-1.2 [19.6 kB] Get:5 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main amd64 git-man all 1:2.7.4-0ubuntu1.6 [736 kB] Get:6 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main amd64 git amd64 1:2.7.4-0ubuntu1.6 [3,176 kB] Get:7 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/main amd64 libltdl7 amd64 2.4.6-0.1 [38.3 kB] Get:8 https://download.docker.com/linux/ubuntu xenial/stable amd64 containerd.io amd64 1.2.4-1 [19.9 MB] Get:9 https://download.docker.com/linux/ubuntu xenial/stable amd64 docker-ce-cli amd64 5:18.09.3~3-0~ubuntu-xenial [13.0 MB] Get:10 https://download.docker.com/linux/ubuntu xenial/stable amd64 docker-ce amd64 5:18.09.3~3-0~ubuntu-xenial [17.4 MB] Fetched 54.4 MB in 11min 52s (76.4 kB/s) Selecting previously unselected package pigz. (Reading database ... 100461 files and directories currently installed.) Preparing to unpack .../pigz_2.3.1-2_amd64.deb ... Unpacking pigz (2.3.1-2) ... Selecting previously unselected package aufs-tools. Preparing to unpack .../aufs-tools_1%3a3.2+20130722-1.1ubuntu1_amd64.deb ... Unpacking aufs-tools (1:3.2+20130722-1.1ubuntu1) ... Selecting previously unselected package cgroupfs-mount. Preparing to unpack .../cgroupfs-mount_1.2_all.deb ... Unpacking cgroupfs-mount (1.2) ... Selecting previously unselected package containerd.io. Preparing to unpack .../containerd.io_1.2.4-1_amd64.deb ... Unpacking containerd.io (1.2.4-1) ... Selecting previously unselected package docker-ce-cli. Preparing to unpack .../docker-ce-cli_5%3a18.09.3~3-0~ubuntu-xenial_amd64.deb ... Unpacking docker-ce-cli (5:18.09.3~3-0~ubuntu-xenial) ... Selecting previously unselected package docker-ce. Preparing to unpack .../docker-ce_5%3a18.09.3~3-0~ubuntu-xenial_amd64.deb ... Unpacking docker-ce (5:18.09.3~3-0~ubuntu-xenial) ... Selecting previously unselected package liberror-perl. Preparing to unpack .../liberror-perl_0.17-1.2_all.deb ... Unpacking liberror-perl (0.17-1.2) ... Selecting previously unselected package git-man. Preparing to unpack .../git-man_1%3a2.7.4-0ubuntu1.6_all.deb ... Unpacking git-man (1:2.7.4-0ubuntu1.6) ... Selecting previously unselected package git. Preparing to unpack .../git_1%3a2.7.4-0ubuntu1.6_amd64.deb ... Unpacking git (1:2.7.4-0ubuntu1.6) ... Selecting previously unselected package libltdl7:amd64. Preparing to unpack .../libltdl7_2.4.6-0.1_amd64.deb ... Unpacking libltdl7:amd64 (2.4.6-0.1) ... Processing triggers for man-db (2.7.5-1) ... Processing triggers for libc-bin (2.23-0ubuntu11) ... Processing triggers for ureadahead (0.100.0-19) ... Processing triggers for systemd (229-4ubuntu21.16) ... Setting up pigz (2.3.1-2) ... Setting up aufs-tools (1:3.2+20130722-1.1ubuntu1) ... Setting up cgroupfs-mount (1.2) ... Setting up containerd.io (1.2.4-1) ... Setting up docker-ce-cli (5:18.09.3~3-0~ubuntu-xenial) ... Setting up docker-ce (5:18.09.3~3-0~ubuntu-xenial) ... update-alternatives: using /usr/bin/dockerd-ce to provide /usr/bin/dockerd (dockerd) in auto mode Setting up liberror-perl (0.17-1.2) ... Setting up git-man (1:2.7.4-0ubuntu1.6) ... Setting up git (1:2.7.4-0ubuntu1.6) ... Setting up libltdl7:amd64 (2.4.6-0.1) ... Processing triggers for libc-bin (2.23-0ubuntu11) ... Processing triggers for systemd (229-4ubuntu21.16) ... Processing triggers for ureadahead (0.100.0-19) ... root@S1:~# docker version Client: Version: 18.09.3 API version: 1.39 Go version: go1.10.8 Git commit: 774a1f4 Built: Thu Feb 28 06:40:58 2019 OS/Arch: linux/amd64 Experimental: false Server: Docker Engine - Community Engine: Version: 18.09.3 API version: 1.39 (minimum version 1.12) Go version: go1.10.8 Git commit: 774a1f4 Built: Thu Feb 28 05:59:55 2019 OS/Arch: linux/amd64 Experimental: false root@S1:~# docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 1b930d010525: Pull complete Digest: sha256:2557e3c07ed1e38f26e389462d03ed943586f744621577a99efb77324b0fe535 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/
除了以上的手安裝方法,也可使用官方提供的腳原本自動化安裝Docker:
curl -sSL https://get.docker.com | sh
若是安裝其餘版本,請指定版本號安裝便可