Docker is a popular containerization platform that allows you to run applications in their own isolated environments. Containerization is often seen as the next evolution of virtualization technology and is often run within virtual machine environments for extra security.
Ubuntu is one of the more popular Linux distributions due to user familiarity and stability.
Today we’re going to install docker on Ubuntu 19 “Disco Dingo” as well as show you how you can access a list of Docker Commands.
There is a script which drastically shortens the amount of time and commands needed to install docker. Here’s the script:
Step 1: type: curl -fsSL https://get.docker.com -o get-docker.sh
Step 2: type sudo sh get-docker.sh
And that’s really it. Those 2 commands should get docker installed on your system.
Preparations
Before actually installing Docker on Ubuntu we are going to have to prepare some things like downloading repos and making sure docker is being downloaded from the proper source to take advantage of the latest release.
Steps
Open Terminal
sudo apt update
in the terminal. What this does is update internet repositories which is essential for finding and downloading the latest version of Docker.sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
sudo apt install apt-transport-https ca-certificates curl software-properties-common
type curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –
curl fsSL http://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –
Type sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/ubuntu disco stable”
Docker finished downloading
Now that we’ve prepared the proper repositories and are prepared to download Docker from the internet using our terminal, its time to actually install docker.
With all our repositories updated and downloaded, we’re all set to go, let’s just do a quick sudo apt update
It’s important to make sure you set your policy to download from Docker and not any other Ubuntu repositories, for this reason, we are going to set our policy to download from docker specifically.
Type Apt-cache policy docker-ce
apt-cache policy docker-ce
from here, you will see 3 things:
Docker sudo apt install docker-ce
\8. type sudo apt install docker-ce
sudo apt install docker-ce
Once that final step has been completed you should have Docker installed. A good way to find out if Docker is properly installed is to use the same apt-cache policy docker-ce
command to see if this time there is a version of Docker installed.
As you can see, after typing apt-cache policy docker-ce our version of Ubuntu is listed next to installed
Installed and candidate version match showing successful installation
Another good way to see if Docker is installed is to bring up a list of commands that you can use to control and configure Docker. If Docker is properly installed, the terminal will start to accept Docker commands.
To get a list of commands:
Type docker
Docker commands
Now that Docker is installed, Ubuntu will recognize Docker commands in the control panel allowing you to implement containerization and begin developing with Docker on your system.
Get featured blog articles, industry news, and specials straight in your inbox.