标签:
本文描述docker的安装
参考官方文档:https://docs.docker.com/engine/installation/linux/ubuntulinux/
安装操作系统:
Ubuntu 14.04
sudo usermod -aG docker ubuntu
修改该文件/etc/default/grub
设置属性值GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
更新sudo update-grub
重启reboot
修改文件:/etc/default/ufw
sudo nano /etc/default/ufw
DEFAULT_FORWARD_POLICY="ACCEPT"
重启ufw功能
sudo ufw reload
允许连接到docker端口
sudo ufw allow
2375/tcp
sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
内容:deb https://apt.dockerproject.org/repo ubuntu-trusty main
sudo apt-get purge lxc-docker
sudo apt-get update
sudo apt-cache policy docker-engine
sudo apt-get update
sudo apt-get install linux-image-extra-$(uname -r)
Ubuntu 14.04 or 12.04需要安装 apparmor
apt-get install apparmor
安装
docker
sudo apt-get update
sudo apt-get install docker-engine
sudo service docker start
sudo docker run hello-world
Sudo docker info:
标签:
原文地址:http://www.cnblogs.com/zhanchenjin/p/5276292.html