Home  >  Article  >  Operation and Maintenance  >  How to install docker in ubuntu

How to install docker in ubuntu

angryTom
angryTomOriginal
2020-03-13 14:50:313338browse

How to install docker in ubuntu

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

How to install docker in ubuntu

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn