In this tutorial you will be shown how to install Docker onto Ubuntu 20.04. Docker is an open source platform that simplifies the process of building, running, managing and distributing applications. It does this by virtualizing the operating system of the computer on which it is installed and running.
Lets Get Started!
- Create a Ubuntu 20.04 VPS server on Linode. The $5 plan will be fine for this tutorial. If your planning on deploying many containers consider using a larger plan.
Lets SSH into Ubuntu 20.04 and perform some updates.
- To SSH into the server we will be using Putty. Download and install Putty.
- Open up putty and type in the IPv4 address of your server and click open.
- Log into your Ubuntu 20.04 server with the username and password.
- started with making sure we have the latest updates installed.
sudo apt update sudo apt upgrade
5. Give it a few minutes for the updates to install and afterwards run the following command to reboot.
Lets Install Docker on Ubuntu 20.04
- Once the server is rebooted and your reconnected into the server using SSH we will now get started with running the following commands.
sudo apt update sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent
2. Now we will have to import the GPG key of the Docker repository:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
3. Followed by adding the docker repository to the APT sources on your system:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
4. Run the update command to update the repository.
sudo apt update
5. Lets make sure we install docker from its repository instead of the Ubuntu repository:
apt-cache policy docker-ce
6. once the previous step completed successfully lets install Docker community edition.
sudo apt install docker-ce
7. If we run the following command, this would tell us if we have properly installed Docker on Ubuntu 20.04
sudo systemctl status docker
If you get message Active (running) we have successfully installed docker.