# mac離線安裝dockerhttps://download.docker.com/mac/stable/24312/Docker.dmg # windows離線安裝dockerhttp://mirrors.aliyun.com/docker- toolbox/windows/docker-too ...
# mac離線安裝docker
https://download.docker.com/mac/stable/24312/Docker.dmg
# windows離線安裝docker
http://mirrors.aliyun.com/docker-
toolbox/windows/docker-toolbox/
docker-toolbox包括以下內容:
Docker CLI //docker客戶端,用來運行docker引擎創建鏡像和容器
Docker Machine. //在命令
行中運行docker引擎命令
Docker Compose. //運行docker-compose命令
Kitematic. //Docker的GUI版本
Docker QuickStart shell. //Docker的命令行環境
Oracle
VM Virtualbox //虛擬機
# ubuntu離線安裝
## 關於ubuntu版本
trusty (14.04LTS)
xenial (16.04LTS)
artful (17.10)
bionic (18.04LTS)
詳細參考:
https://packages.ubuntu.com
## 下載docker
https://apt.dockerproject.org/repo/pool/main/d/docker-engine/
## 下載依賴包
https://pkgs.org/
libltdl7
libgcrypt20
libsystemd-journal0
## 安裝
dpkg -i *.deb
## 測試
docker version
# ubuntu線上安裝docker
1.curl -sSL http://acs-public-mirror.oss-cn-hangzhou.aliyuncs.com/docker-engine/internet | sh -
2.安裝依賴
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
3.添加使用 HTTPS 傳輸的軟體包以及 CA 證書
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates
4.添加GPG密鑰
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
5.添加軟體源
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
6.添加成功後更新軟體包緩存
sudo apt-get update
7.安裝docker
sudo apt-get install docker-engine
8.啟動 docker
sudo systemctl start docker
9.設置開機自啟動
systemctl enable docker
systemctl disable docker
10.docker鏡像加速
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://aaabbbccc.m.daocloud.io
docker run hello-world
編輯/etc/docker/daemon.json,添加如下內容:
{
"registry-mirrors": ["http://hub-
mirror.c.163.com","https://1234abcd.mirror.aliyuncs.com"]
}
sudo systemctl daemon-reload
sudo service docker restart