Ubuntu Docker installation
Docker supports the following Ubuntu versions:
Ubuntu Precise 12.04 (LTS)
Ubuntu Trusty 14.04 (LTS)
Ubuntu Wily 15.10
Other newer versions...
Prerequisite
Docker requires the kernel version of the Ubuntu system to be higher than 3.10. Check the prerequisites on this page to verify whether your Ubuntu version supports Docker.
Check your current kernel version through the uname -r command
php@php:~$ uname -r
##Use a script to install Docker1. Get the latest Version of the Docker installation package
php@php:~$ wget -qO- https://get.docker.com/ | sh
After entering the current user's password, the script will be downloaded and Docker and dependent packages will be installed. There is a prompt after the installation is completed: If you would like to use Docker as a non-root user, you should now consider adding your user to the "docker" group with something like: sudo usermod -aG docker php Remember that you will have to log out and back in for this to take effect!When you want to run docker directly as a non-root user, You need to execute the
sudo usermod -aG docker php command and then log in again, otherwise the following error will be reported
2. Start the docker background servicephp@php:~$ sudo service docker start
3. Test run hello-worldphp@php:~$ docker run hello-world