码迷,mamicode.com
首页 > 系统相关 > 详细

ubuntu 16.04 跑 docker

时间:2018-04-29 01:21:47      阅读:247      评论:0      收藏:0      [点我收藏+]

标签:清华大学   comm   rest   ror   list   prope   highlight   linu   服务   

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

标签:清华大学   comm   rest   ror   list   prope   highlight   linu   服务   

原文地址:https://www.cnblogs.com/vincentzhou/p/8969900.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!