How to install docker in Ubuntu
The method and steps to install docker in Ubuntu are as follows:
1. Update the apt source index of ubuntu
sudo apt-get update
2. The installation package allows apt to use the warehouse through HTTPS
Recommended learning: docker tutorial
sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common
3. Add Docker official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
4. Set up Docker stable version warehouse
sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable"
5. After adding the warehouse, update the apt source index
sudo apt-get update
6. Install the latest version of Docker CE (Community Edition)
sudo apt-get install docker-ce
7 , Check whether Docker CE is installed correctly
sudo docker run hello-world
The following message appears, indicating that the installation is successful
The above is the detailed content of How to install docker in ubuntu. For more information, please follow other related articles on the PHP Chinese website!