MEMO Storage
Search…
For Linux
Before starting the memo, you must install docker.

How to install Docker in Linux(Ubuntu):

1、Update apt package index

sudo apt-get update

2、Install the following packages to enable apt to use the repository over HTTPS

sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common

3、Add the GPG key of Docker official

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

4、Run the following command line to set up the stable repository

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

5、 Update the apt package index again

sudo apt-get update

6、 Install the latest version of Docker CE

sudo apt-get install -y docker-ce

7、 Verify whether the installation is successful

Check the version of docker installed
docker -v
Start docker and pull hello-world to verify whether the installation is successful
sudo service docker start
Since sudo access is required to use docker, enter the password here and it will be started successfully.
Next, run the following command line
sudo docker run hello-world
You can see the container being downloaded from the remote for testing: Pulling from library/hello-world
When you see the message: Hello from Docker! It means the docker is successfully installed.
Export as PDF
Copy link
Outline
How to install Docker in Linux(Ubuntu):