In
Ubuntu
Installed in
Docker
Docker currently supports the following Ubuntu systems:
- Ubuntu xenial 16.04 (LTS)
- Ubuntu Wily 15.10
- Ubuntu trusty 14.04 (LTS)
- Ubuntu precise 12.04 (LTS)
Complex operations
Check kernel version
Docker requirements are 64-bit Ubuntu (whichever version). In addition, the kernel must be at a minimum of 3.10. 3.10 The latest version or newer version also line. The reason is that prior to 3.10, the version lacks the features required by Docker to run some containers. These old versions of bugs often lead to data loss.
Check Device Mapper
Is-l /sys/class/misc/device-mapper
Update apt Source
Docker's APT warehouse includes Docker 1.7.1 and later. To set APT to use the latest repository package, use sudo or root permissions to log on to the computer. Update the installation package information to ensure that APT uses the HTTPS protocol and that the CA certificate has been installed.
Update the installation package information to ensure that APT uses https
the protocol and that the CA certificate has been installed.
$ sudo apt-get update $ sudo apt-get install apt-transport-https ca-certificates
Add a new GPG
key
$ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Add or edit the Docker.list file in the source list to add entry (Ubuntu xenial 16.04 (LTS)) according to the system version
vi /etc/apt/sources.list.d/docker.list
Comment out the original content, add the following content:
# deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial edgedeb https://apt.dockerproject.org/repo ubuntu-xenial main
Re-perform the update operation and remove the old repo
$sudo apt-get purge lxc-docker //没有安装的话,跳过
See if you have the correct version availablesudo apt-cache policy docker-engine
Docker recommends installing Linux-image-extra from above version 14.04
sudo apt-get install linux-image-extra-$(uname -r)
Installing Docker
sudo apt-get updatesudo apt-get install docker-enginesudo service docker start
Check
[~] docker -vDocker version 17.05.0-ce, build 89658be
Simple operation
sudo apt-get install-y curl curl -sSL https://get.docker.com/ubuntu/ | sudo sh
Using a non-root user
1. $ sudo groupadd docker2. $ sudo gpasswd -a ${USER} docker3. $ sudo service docker restart4. login again`
Ubuntu Install Docker