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

How to install docker in ubuntu

angryTom
Release: 2020-03-13 14:50:31
Original
3436 people have browsed it

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
Copy after login
Copy after login

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
Copy after login

3. Add Docker official GPG key

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Copy after login

4. Set up Docker stable version warehouse

sudo add-apt-repository \   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
Copy after login

5. After adding the warehouse, update the apt source index

sudo apt-get update
Copy after login
Copy after login

6. Install the latest version of Docker CE (Community Edition)

sudo apt-get install docker-ce
Copy after login

7 , Check whether Docker CE is installed correctly

sudo docker run hello-world
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template