### Docker Installation > Here, we take the Linux system (Ubuntu 20.04 distribution) as an example. > If you are not using Linux, please refer to the Windows/MacOS installation process. According to the official Docker website, we can know there are different installation methods. ![](https://i.imgur.com/4ig9rVm.png) We install docker in the recommended way> ### Install using the repository 1. Use `apt` package manager to install packages to allow apt to use repositories via HTTPS ```shell= sudo apt-get update ``` ```shell= sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg \ lsb-release ``` 2. Add Docker’s official GPG key ```shell= curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg ``` 3. Set up the stable repository ```shell= # for AMD64/x86_64 architecture root@shell:$ echo \ "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null ``` 4. Install Docker Engine ```shell= sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io ``` OK, if you have completed all the above steps, you can start using Docker Let's test if docker is installed correctly ```shell= sudo docker run hello-world ``` ![](https://i.imgur.com/PWifuGZ.png) great! it works. By the way, you can refer to the image you have. ```shell= sudo docker images ``` ![](https://i.imgur.com/IRnfQVJ.png) "hello-world" repository is pulled remotely by the command "docker run hello-world" --- @ docker for devops series - 0 ###### tags: `CY`