What is Docker and how to install Docker on Ubuntu

What is Docker?

Docker is computer software tool use for Build, Ship and Run applications with containers anywhere. It’s one kind of Virtualization in order to have multiple Operating systems running on the same host.

What is Image?

Image is a template. Docker images contains source code for containers which is used to build containers. Image can have pre-installed software by using that we speed up the development. Images are portable enough, and we can used existing images or we can create our own.

## List Docker images

docker image ls

What is Container?

Container is a runtime instance of Image (template). We can have multiple copies (containers) of the same Image. Containers are Flexible, Lightweight, Interchangeable, Portable and Scalable. Container runs natively on Linux and shares the kernel of the host machine with other containers so it is lightweight.

Docker Basic

## List of running Docker Containers

docker ps

How to install Docker in Linux (Ubuntu) machine?

1) Need to update the OS with the latest packages…

sudo apt-get update

2) Need to install the necessary certificates that will be required to work with Docker

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

3) Then add the GPA key for the official Docker repository to your system

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

4) Add the Docker repository to APT sources

sudo add-apt-repository “deb [arch-amd64] https://download.docker.com/linux/ubuntu bionic stable”

5) Need to update the package database with the Docker packages from the newly added repo

sudo apt-get update

6) Make sure you are about to install from the Docker repo instead of the default repo

apt-cache policy docker-ce

7) Finally, install Docker

sudo apt install docker-ce

8) To check the status of Docker

sudo systemctl status docker

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.