在UBUNTU中安装DOCKER

更新

根据官网提供的教程,可以使用apt-get安装docker

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
apt-cache madison docker-ce
sudo docker container run hello-world 
# Verify that Docker CE is installed correctly by running the hello-world image.

可以将docker加到sudo用户组,这样不用每次输入sudo docker了

sudo groupadd docker
sudo usermod -aG docker $USER
# Log out and log back in so that your group membership is re-evaluated.
docker run hello-world 
# Verify that you can run docker commands without sudo.

参考

Ubuntu14.04下安装docker
《第一本docker书》-JamesTurnbull

docker本身在ubuntu的软件包里面包含有,但是不一定是最新版,所以本文通过添加docker源来安装

系统要求

Linux内核在3.8以上
ubuntu 12.04.3以上,64位
RHEL(CentOS)6以上,64位
Fedora Core 19以上,64位
##其他要求
Device Mapper 作为存储驱动,2.6.9以后的Linux内核应该都支持
修改UFW, /etc/default/ufw 中 DEFAULT_FORWARD_POLICY=“DROP” 改为 DEFAULT_FORWARD_POLICY=“ACCEPT”

本文的系统版本是 ubuntu 14.04 64位

安装

sudo apt-get install apt-transport-https 
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 
sudo bash -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" 
sudo apt-get update 
sudo apt-get install lxc-docker

安装之后,输入

sudo docker info

确认安装成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值