1. Overview
This document describes the installation of Docker
Reference Official Document: https://docs.docker.com/engine/installation/linux/ubuntulinux/
Install the operating system:
Ubuntu 14.04
2. Detection Prerequisites
- Make sure Ubuntu version >=3.8
- Make sure to install Device-mapper
3. Other parameter Optimization 3.1. Create a Docker user group and join the current user to the user group
sudo usermod-ag docker ubuntu
3.2. Modify the memory and account exchange mechanism
Modify the file/etc/default/grub
Set property value grub_cmdline_linux= "Cgroup_enable=memory swapaccount=1"
Update sudo update-grub
Restart reboot
3.3. Turn on the UFW function
Modified file:/etc/default/UFW
sudo nano/etc/default/UFW
Default_forward_policy= "ACCEPT"
Restart UFW function
sudo ufw reload
Allow connection to Docker port
sudo ufw allow
2375/tcp
4. Installing Docker
sudo apt-get install Apt-transport-https ca-certificates
sudo apt-key adv--keyserver hkp://p80.pool.sks-keyservers.net:80--recv-keys 58118e89f3a912897c070adbf76221572c52609d
- Create apt Warehouse file/etc/apt/sources.list.d/docker.list
Content: Deb Https://apt.dockerproject.org/repo ubuntu-trusty Main
sudo apt-get purge Lxc-docker
sudo apt-get update
- Make sure the docker-engine is valid
sudo apt-cache policy docker-engine
- Install dependent packages
sudo apt-get update
sudo apt-get install linux-image-extra-$ (uname-r)
Ubuntu 14.04 or 12.04 needs to be installedapparmor
apt-get install apparmor
sudo apt-get update
sudo apt-get install Docker-engine
- Open Docker Backend Daemon
sudo service docker start
- Verify that Docker is installed successfully
sudo Docker run Hello-world
- Make sure Docker is ready
Sudo Docker Info:
docker--Installation of PAAs architecture