![How to install docker in ubuntu environment](https://img.php.cn/upload/article/000/000/041/5e96b057c48a1672.jpg)
1. Check whether the relevant version of the operating system meets the prerequisites for installing docker
![1586933880509688.png How to install docker in ubuntu environment](https://img.php.cn/upload/image/396/292/946/1586933880509688.png)
##2. Add docker source:
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list
Copy after login
3. Then check whether the network can be connected, and finally update the source package, as shown below:
![1586933923101789.png How to install docker in ubuntu environment](https://img.php.cn/upload/image/290/882/396/1586933923101789.png)
4. If there is no problem with the source package update, we now You can use the following 2 commands to install docker with one click:
apt-cache search docker
Copy after login
apt-get install docker-engine
Copy after login
5. If there is no problem with the above installation, finally we use the command:
docker version
Copy after login
to check the installed docker version, as shown in the figure below, we It worked.
![1586934034812823.png How to install docker in ubuntu environment](https://img.php.cn/upload/image/334/762/115/1586934034812823.png)
Recommended tutorial:
docker tutorial
The above is the detailed content of How to install docker in ubuntu environment. For more information, please follow other related articles on the PHP Chinese website!