Docker簡介
引用參考:
https://help.aliyun.com/knowledge_detail/42851.html
https://docs.docker.com/engine/installation/linux/ubuntulinux/
準(zhǔn)備工作:
- 阿里云服務(wù)器
- SecureCRT (其他終端皆可)
- 網(wǎng)絡(luò)連通...
阿里云Ubuntu 16.04 64位服務(wù)器
$ sudo apt-get update
如果內(nèi)核版本較舊,則需要先更新內(nèi)核挽懦,以下是更新xenial內(nèi)核
$ sudo apt-get install linux-image-generic-lts-xenial
$ sudo reboot
使用curl獲取最新的Docker (使用阿里的鏡像服務(wù)且使用云服務(wù)器外部網(wǎng)絡(luò)下載)
$ curl -sSL http://acs-public-mirror.oss-cn-hangzhou.aliyuncs.com/docker-engine/internet | sh -
使用curl獲取最新的Docker (使用阿里的鏡像服務(wù)且使用云服務(wù)器內(nèi)部網(wǎng)絡(luò)下載)
目前未通過
$ curl -sSL http://acs-public-mirror.oss-cn-hangzhou.aliyuncs.com/docker-engine/intranet | sh -
提示:此時Docker已安裝完成翰意,但Docker下載鏡像會相當(dāng)?shù)穆?/p>
使用阿里云的加速器,也就是阿里云的又一個鏡像
使用阿里云的開發(fā)者平臺登錄云服務(wù)器后臺 https://dev.aliyun.com/
找到加速器地址信柿,配置鏡像的地址(直接執(zhí)行命令)
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo tee /etc/systemd/system/docker.service.d/mirror.conf <<-'EOF'
[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// --registry-mirror=https://***l0kzl.mirror.aliyuncs.comEOF
sudo systemctl daemon-reload
sudo systemctl restart docker
測試
因為使用阿里云內(nèi)網(wǎng)地址下載冀偶,使用加速器后下載的速度很快