Basics of Containerization Docker Engine

Introduction

Docker Engine is open-source software, the most popular container management platform, and considering that containerization in the field of software development is now an indispensable thing, this tool is really important and useful for every engineer who implements elements of DevOps methodology.

Why? Let's consider this further.


It is frequently compared to how a trucking firm operates to understand how Docker works.
Once, transport businesses had to deal with the challenge of transporting various items together (for example, food with household chemicals or glass with bricks).
How are things of various sizes and sorts transported on a single truck?

Containers made it possible for this to happen. Various sizes of cargo are separated into standardized containers and transported by the same vehicle.

Now back to our containers.


When an application is developed, the code must be provided along with all its components such as libraries, servers, databases, etc.
But you can find yourself in a situation when the application works on your machine but refuses to turn on and work on another.

This problem is solved by creating software independent of the system. Docker divides the core of the operating system into containers that work as separate processes.

It solves many tasks related to creating containers, placing applications in them, managing processes, as well as testing software and its individual components.

So, A container is a standardized software component that packages up code and all of its dependencies to ensure that an application will run swiftly and consistently in different computing environments. An application's code, runtime, system tools, libraries, and settings are all included in a lightweight, independent, executable package known as a "Docker container image."

It is needed for more efficient use of the system and resources, quick deployment of finished software products, as well as for their scaling and transfer to other environments with guaranteed preservation of stable operation.

Docker helps:

  • minimal use of resources;
  • it is convenient to hide background processes;
  • easy to scale;
  • reduce the time between writing and running the code;
  • test faster;
  • deploy quickly;
  • in general, create applications faster.

At its core, docker allows you to run almost any application safely isolated in a container. Secure isolation allows multiple containers to run on the same host at the same time.

Docker is characterized by a fairly simple syntax. Therefore, it is quite simple for experienced IT professionals and beginners as well. The software is compatible with Linux, Windows, and Mac, so the scope of the application of Docker is practically unlimited.

Docker usage


Top 15 Docker commands:

  • docker –version              -    get the currently installed version of docker
  • docker pull                      -    pull images from the docker repository
  • docker run                       -    create a container from an image
  • docker ps                         -    list the running containers
  • docker ps -a                    -    show all the running and exited containers
  • docker exec                     -    run a command in a running container
  • docker stop                      -    gracefully stop a running container
  • docker kill                         -    kill the container by stopping its execution immediately
  • docker commit               -    create a new image of an edited container on the local
  • docker login                     -    login to the docker hub repository
  • docker push                     -    push an image to the docker hub repository
  • docker images                 -    lists all the locally stored docker images
  • docker rm                         -    delete a stopped container
  • docker rmi                        -    delete an image from local storage
  • docker build                     -    build an image from a specified docker file

Run 'docker COMMAND --help' for more information on specific command.
Run 'docker' for general help with usage.

Read also

SDLC Explanation

Since DevOps is a methodology aimed at improving the quality and speed of software development, let's consider the development process itself and it`s stages. SDLC is a systematic method for building code that ensures the standard and correctness of the software built and stands for the Software Development Life Cycle

Terraform for Beginners How and Why?

Terraform is an IAC tool, used primarily by DevOps teams to automate various infrastructure tasks.