1. 程式人生 > >ubuntu 16.04 跑 docker

ubuntu 16.04 跑 docker

deb ebo 清華大學 ftw sport update ati load security

Ubuntu 的軟件源配置文件是 /etc/apt/sources.list

換國內的,不然會瘋。下面是清華大學滴:

# 默認註釋了源碼鏡像以提高 apt update 速度,如有需要可自行取消註釋
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

然後reboot一下服務器。

$ sudo apt-get update

$ sudo apt-get install     apt-transport-https     ca-certificates     curl     software
-properties-common $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - $ sudo apt-key fingerprint 0EBFCD88 $ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" $ sudo apt-get update $ sudo apt-get install docker-ce

然後配置個docker加速器

curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://xxxxxxxxx.m.daocloud.io

然後根據提示,重新啟動一下docker服務,輸入docker info,就可以看到docker的情況啦~

ubuntu 16.04 跑 docker