Docker 101: What Would Docker Do?
By: Dominic Holder
Tags: Linux, Software Development, Development, DevOps, Docker

As a developer, DevOps is critical to the survival of your business but deployment is a tricky situation. With so many options out there, it’s hard to know where to turn to. Considering the complexity of app development today, there’s pressure for code to be factored before implementation. There are multiple languages, frameworks and different kinds of interfaces between our tools that make deployment that much more difficult. That’s where Docker comes in…

What Is Docker?

Docker is an application build, deployment tool and open source containerization platform. Docker is the current industry standard of deploying containerized applications. It is based on the idea that you package your code along with libraries and dependencies into a deployable unit called a container.

Containers are a standardized executable component that combines application source code with all the operating system (OS) libraries and dependencies required to run the code in any environment. Containers provide consistency and accessibility that developers can rely on. Thanks to the container, developers can rest assured that their applications will run on any other machine regardless of any differing, customized settings that other machines might have. The use of containers to deploy applications is called containerization.While developers can create containers without Docker, containers are now easier, simpler and safer to build, deploy and manage. Furthermore, Docker enables developers to build, deploy, run, update, and stop containers using simple commands through work-saving automation. Just as shipping containers have revolutionized the import/export industry, Docker has done the same in tech.

Images are the basic building blocks of Docker. In fact, containers are built from images. A Docker image is a lightweight, standalone, executable package of software that includes everything needed to run an application including code, runtime, system tools, libraries and settings. They provide a convenient way to package up applications and preconfigured server environments, which you can use for your own private use or share publicly with other Docker users. Images can be configured with applications and used as a template for creating containers. It is organized in a layered fashion. Every change in an image is added as a layer on top of it.

There are two ways to create a Docker image:

Interactive Method: By running a container from an existing Docker image, manually changing that container environment through a series of live steps and saving the resulting state as a new image.

By running a container from an existing Docker image, manually changing that container environment through a series of live steps and saving the resulting state as a new image. Dockerfile Method: By constructing a plain-text file, known as a Dockerfile, which provides the specifications for creating a Docker image.

How does Docker work?

On October 16, 2014, Docker 1.0 was released to the world. Designed with the intent to make containers user-friendly, Docker brought container technology to enterprises worldwide. And from then on, Docker has continued to be the solution for companies and organizations who want to deliver functionality faster.

Similar to how virtual machines (VM) virtualize (remove the need to directly manage) server hardware, containers virtualize the operating system of a server. Docker is installed on each server and provides simple commands you can use to build, start, or stop containers. Docker uses containers, in lieu of virtual machines, to enable multiple applications to simultaneously run on the same server. Unlike virtual machines, rather than creating a whole virtual operating system, Docker allows applications to use the same Linux kernel as the system that they’re running on and only requires applications be shipped with things not already running on the host computer. This gives a significant performance boost and reduces the size of the application. Also, Docker is open source. Meaning, anyone can contribute to Docker and extend it to meet their own needs if they need additional features that aren’t readily available.

Another reason why containers are popular is they lend themselves to Continuous Integration and Continuous Development (CI/CD). These are DevOps practices designed to encourage developers to integrate their code into a shared repository early and often, and then to deploy the code quickly and efficiently.

Why should you use Docker?

Flexible : Even the most complex applications can be containerized.

: Even the most complex applications can be containerized. Lightweight : Containers leverage and share the host kernel, making them much more efficient in terms of system resources than virtual machines.

: Containers leverage and share the host kernel, making them much more efficient in terms of system resources than virtual machines. Portable : You can build locally, deploy to the cloud, and run anywhere.

: You can build locally, deploy to the cloud, and run anywhere. Loosely coupled : Containers are highly self sufficient and encapsulated, allowing you to replace or upgrade one without disrupting others.

: Containers are highly self sufficient and encapsulated, allowing you to replace or upgrade one without disrupting others. Scalable : You can increase and automatically distribute container replicas across a datacenter.

: You can increase and automatically distribute container replicas across a datacenter. Secure: Containers apply aggressive constraints and isolations to processes without any configuration required on the part of the user.

Who is Docker for?

Developers who want their applications deployed on many different systems.

System administrators who need an easy way to install applications on all their systems

Users or system administrators who need to use software not available from their Linux package manager. For example, you are able to run Ubuntu packages on Fedora.

How do you use Docker?

Distributing the OS of your app with a team as a version control system.

In development phases like “Development”, “Testing” & “QA”.

While running your code locally to replicate the server’s environment.

Docker Components:

Docker is composed of the following components

Docker Client and Daemon

Docker Registry

Docker Engine

Docker Swamp

Docker Desktop

Docker Hub

Docker Objects (Images, Containers, etc.)

Conclusion:

I hope you enjoyed this article and are now equipped with the knowledge to use Docker on your own system. Happy Dockerizing!!!