docker17.03.*-ce安裝
安裝軟件包以允許apt通過HTTPS使用存儲庫:
$ sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
進行安裝最新版本的ce:
$ sudo apt-get -y install docker-ce
參考這個,順著做一遍就好了:
https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#install-using-the-repository
注意:
如果出現不知道ifconfig location之類的錯誤,直接在shell中執行這個指令,按照提示安裝一下它即可了。
加速器
只推薦兩個最好的,其他的就不說了:
特大新聞,docker有官方的中國區加速器了!
--registry-mirror=https://registry.docker-cn.com網易163 docker鏡像
$ sudo echo "DOCKER_OPTS="--registry-mirror=http://hub-mirror.c.163.com"" >> /etc/default/docker
$ service docker restart
其他daocloud等比較麻煩,要注冊還有限制:
http://guide.daocloud.io/dcs/daocloud-9153151.html
參考:http://www.datastart.cn/tech/2016/09/28/docker-mirror.html
root@li-virtual-machine:/home/li# bash -c "$(docker run --rm daocloud.io/daocloud/dce install)"
Unable to find image 'daocloud.io/daocloud/dce:latest' locally
docker: Error response from daemon: Get https://daocloud.io/v2/: net/http:request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See 'docker run --help'.