Your Webhosting Questions
Answered by the Webhosting Experts

An Introduction to Docker: What is Docker & What Are Its Benefits?

Hero image of the Docker logo with text reading "Part 1: An Introduction to Docker"

Containerization platforms like Docker have revolutionized the way businesses think about their data and digital infrastructure. By emphasizing optimal resource usage and scaling, Docker allows system admins to build focused, precise systems with minimal overlap, resulting in platforms and services which are more reliable, reproducible, and efficient. With its ability to standardize software deployments into single deployment solutions that work across all environments, it’s of little wonder why containerization solutions like Docker have become the preferable alternative to more traditional deployment methods.

But what is Docker and what can its benefits mean for you? Is containerization the right solution for your organization? 

In this series of five articles, we’ll cover an overview of Docker and its advantages, how its components work, the basic installation process, deploy our first container, discuss advanced solutions like Docker-Compose which allow for system-wide control via a single, modifiable document, and a selection of need-to-know commands for working with Docker. By the end, you’ll have a thorough understanding of Docker, know the basics of deploying containers, and see some examples of the ways Docker can help revolutionize your organization’s systems.

Prefer a more visual format? Check out our Quick Overview of Docker: The Benefits of Containerization section at the bottom of this article for a video summary of the concepts we cover here as well as charts and diagrams designed to help visualize the differences between Docker and more traditional deployment methods.

But first, what is Docker?

What Is Docker?

Released in 2013, Docker is a free-to-use PaaS solution designed to offer a lightweight alternative to traditional virtual machines. Unlike VMs, Docker’s containers don’t require their own kernel, virtualized hardware, or dedicated resources. This allows containers to run with the minimum amount of dependencies, resources, and disk space needed to run an application.  

By splitting complex systems into smaller services, containerization allows for higher resource efficiency with consistent output results. This improves performance by isolating workflows and reducing resource overlap, allowing more processes to work in unison with fewer bottlenecks, and allowing entire services to ship as singular deployments. 

Docker is also preferable to VM or bare metal methods of running processes because the monotonous task of micromanaging an operating system is passed off to Docker. This means that developers can focus on writing code instead of managing multiple releases. Additionally, system administrators can leverage Docker to reduce downtime, save resources, and increase consistency across their infrastructure.

So in the end, Docker is similar to a virtual machine, but minus the overhead and hardware virtualization. 

Docker logo

What Can Docker Do?

Docker can run anything you would want to deploy on a bare metal server or virtual machine, but inside of a container instead. This can be done by taking the code or program of the intended service, stating its dependencies, and specifying an OS layer for it to run off of in something called a Dockerfile. A Dockerfile is the blueprint of a Docker image, which is used to run containers. 

A large variety of software can be run inside containers, including operating systems, webservers, and much more.

What Makes Docker Preferable Over Traditional Deployments?

Size: Containers only take up a small amount of space, usually 100MB – 500MB per image. Compare this to a VM which would require multiple GB of disk space for the OS alone.

Resources: Resources are another inherent benefit with containers. With VM’s the RAM allocated to a VM will be unavailable to other VM’s in the system. With Docker, a container only uses the amount of RAM it needs for its current process, with the rest of the RAM available for other containers to use. This aspect of Docker holds true in regards to CPU allocation as well. Many deployments have seen massive efficiency gains upon moving to a containerized deployment environment.

Flexibility/Management: Flexibility and management of containers is where Docker wins the most. Take for example a server binary: for traditional deployments like .exe, .deb, and .rpm, binaries need to be developed and maintained for the service to be available to the majority of administrators. This takes effort and resources, as different codebases need to be updated and monitored. Any dependencies will need to be installed in addition to the base binary, which increases time to deploy and size of deployments.

Unlike traditional deployments, Docker only requires one deployment method that will work on almost any operating system, with all the dependencies shipped and configured by default. With a traditional deployment you port the process only, but with Docker you ship everything needed to run the service. This includes the operating system, dependencies, and full environment, all neatly bundled into the aforementioned container. 

There are many other benefits to containers as well, but the above mentioned advantages are reason enough to consider Docker.

Still unsure if Docker is the right solution for your organization? Watch the video below for a quick visual overview of why Docker is useful, how it compares to traditional virtual machines, and some real life examples of what a Docker deployment might look like.

A Quick Overview of Docker: The Benefits of Containerization

A Note on Kubernetes

I would be remiss at this point to not mention another very prominent technology related to containers: Kubernetes. Developed by Google and released as an open source solution in 2014, Kubernetes (or K8s) has taken the next major step with containers by orchestrating and automating them. This allows for large, complex platforms known as microservices which have the traits of auto-healing, auto-failover, and auto-scaling. Basically, Kubernetes is taking Docker and clustering it across multiple instances, allowing your businesses and services to easily scale horizontally with the most efficiency possible.

Unfortunately, Kubernetes has a much steeper learning curve than Docker. As both platforms operate on similar principles, before attempting to use Kubernetes, I highly recommend obtaining a working knowledge of Docker first. 

Getting Started with Docker

So, now that we have a grasp of how Docker works and the benefits it can bring to your digital infrastructure, how do we actually use and deploy Docker containers in a real environment?

To understand how to work with Docker, we first need to understand several components necessary to using Docker successfully in a production environment. These components are Docker Volumes, Docker Networking, Docker-Compose, and a working knowledge of the Docker cli client.

In our next article, Getting Started with Docker: Installation & Basics, we’ll cover these key components of Docker as well as providing basic instructions for installing Docker onto your system so you can start working with the platform. Read on to learn more or check out our blog and knowledge base for more great content and industry insights from the hosting experts at Hivelocity.

– written by Eric Lewellen

Need More Personalized Help?

If you have any further issues, questions, or would like some assistance checking on this or anything else, please reach out to us from your my.hivelocity.net account and provide your server credentials within the encrypted field for the best possible security and support.

If you are unable to reach your my.hivelocity.net account or if you are on the go, please reach out from your valid my.hivelocity.net account email to us here at: [email protected]. We are also available to you through our phone and live chat system 24/7/365.

Tags +
...