arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

For Linux

Before starting the memo, you must install docker.

hashtag
Docker: Install on Linuxarrow-up-right

hashtag
How to install Docker in Linux(Ubuntu):

hashtag
1、Update apt package index

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

hashtag
3、Add the GPG key of Docker official

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

hashtag
5、 Update the apt package index again

hashtag
6、 Install the latest version of Docker CE

hashtag
7、 Verify whether the installation is successful

Check the version of docker installed

Start docker and pull hello-world to verify whether the installation is successful

Since sudo access is required to use docker, enter the password here and it will be started successfully.

Next, run the following command line

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.

sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install -y docker-ce
docker -v
sudo service docker start
sudo docker run hello-world