準備工作:
1.vmware-tools安裝:

2.安裝docker:
# step 1: 安裝必要的一些系統工具
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
# step 2: 安裝GPG證書
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
# Step 3: 寫入軟體源資訊
sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
# Step 4: 更新并安裝 Docker-CE
sudo apt-get -y update
sudo apt-get -y install docker-ce
可能出現的問題:
1.sudo apt-get update 運作時出現提示:
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin /appstreamcli; then appstreamcli refresh > /dev/null; fi'
E: Sub-process returned an error code
解決方法:
先remove libappstream3
sudo apt-get remove libappstream or sudo apt remove libappstream3 再進行 update: sudo apt-get update\
2.
[email protected]:$ docker version
Client:
Version: 17.03.0-ce
API version: 1.26
Go version: go1.7.5
Git commit: 3a232c8
Built: Tue Feb 28 07:52:04 2017
OS/Arch: linux/amd64
Server:
Version: 17.03.0-ce
API version: 1.26 (minimum version 1.12)
Go version: go1.7.5
Git commit: 3a232c8
Built: Tue Feb 28 07:52:04 2017
OS/Arch: linux/amd64
Experimental: false
server不顯示:
sudo groupadd docker
sudo gpasswd -a $USER docker
newgrp docker