What is Docker? — Complete Beginner's Guide

Bala
3 min readJun 17, 2020

Docker is a containerization platform that packages your application and all its dependencies together in the form of a docker container. This ensures that our application works seamlessly in any environment.

What are Containers?

A container is a standard unit of software. A Docker container image is a lightweight standalone, executable package of software that included everything needed to run an application: code, runtime, system tools, system libraries, and settings.

Containers vs. Virtual Machines

Containers and Virtual Machines are closely related. As the purpose they serve is pretty much the same. A major difference can be made out from the below image:

From the figure, if we see the docker always runs on the top of the host operating system. The container has the libraries, binary files, and application itself and it doesn't have individual operating systems.

Virtual machines are running on a separate operating system and each VM has its own libraries, binary files, and applications. Due to the included Guest OS, it makes the virtual machine comparatively more complex and requires more combustion power to run.

Set up your Docker environment

(Below commands were tested in Linux system)

Follow below instruction to download appropriate operating system, download and install:

Open the terminal and run below commands to check the docker installation.

$ docker --version

To test docker installation if it is done completely and working. Use below commands:

  1. Test the installation with by running simple hello-world on the docker image

2. Run docker image ls to list the hello-world image that we downloaded to the machine.

$ docker run hello-world

Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
ca4f61b1923c: Pull complete
Digest: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.
...

3. List the hello-world container, with --all option:

$ docker ps --all

CONTAINER ID IMAGE COMMAND CREATED STATUS
54f4984ed6a8 hello-world "/hello" 20 seconds ago Exited (0) 19 seconds ago

At this point, you have completed the docker setup. You can start to build and run your image according to your application requirements. Docker is ready for the first containerized application.

Useful Links:

If you have further questions, don’t hesitate to contact us! And as always, feel free to send us any questions or feedback you might have.

--

--