Beginners Guide on How to Install and Setup Docker on Ubuntu 18.04 Bionic Beaver
Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels. Developing in Docker speeds up applications, as it shares the kernel and other resources, instead of requiring dedicated resources. There are two versions of Docker – Docker CE (Community Edition) and Docker EE (Enterprise Edition). If you have a small-scale project, or you’re just learning, you’ll want to use Docker CE. Requirements
- Ubuntu 18.04 Bionic Beaver
- Terminal
- User Account with Root Access
- Docker Software Repositories (Optional)
So Let Us Now Install Docker on our Linux Machine.
Step 1 : Update Software Repositories
As usual, it’s a good idea to update the local database of software to make sure you’ve got access to the latest revisions. Therefore, open a terminal window and type:sudo apt-get update
Step 2 : Uninstall Older Version of Docker
Next, it’s recommended to uninstall any old Docker software before proceeding.Use the command:
sudo apt-get remove docker docker-engine docker.io
Step 3 : Install Docker
To install Docker on Ubuntu, in the terminal window enter the command:sudo apt install docker.io
Step 4 : Start and Automate Docker
The Docker service needs to be setup to run at startup. To do so, type in each command followed by enter:sudo systemctl start docker
sudo systemctl enable docker
Step 5 : Check Docker Version {Optional}
To verify the installed Docker version number, enter:docker --version