How to Setup Docker on Ubuntu 18.04

How to Setup Docker on Ubuntu 18.04

Written by Lord SpoWN on Jun 8th, 2019 Views Report Post

How to Install Docker on Ubuntu 18.04

Docker is not in the official Ubuntu 18.04 repositories. However, the installation process will not be complicated. 

1. Access Your VPS or your VM

First, we have to connect to the server using SSH or Terminal. 

2. Update Your System

Then, the system needs to be updated. Run the following commands:

sudo apt update

sudo apt upgrade

3. Install Prerequisite Packages

Once we have updated the system, we need to install some necessary packages before installing Docker. Run the command below to install the packages:

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

4. Add the Docker Repositories

Now we have to add the Docker repositories. This will make the installation process much easier. This enables us to use the officially supported method of the installation.

First, we add the GPG key and add the repository and update the system, by entering the following commands in the command line:

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 update

5. Install Docker on Ubuntu 18.04

Use the apt command to install Docker on your server:

sudo apt install docker-ce

6. Check Docker Status

Once the installation is complete, it is time to check the status of the service by running the command below.

sudo systemctl status docker

That’s it, you now know how to install Docker on Ubuntu 18.04. The installation process is pretty easy. 

Comments (0)