X
Tech
Why you can trust ZDNET : ZDNET independently tests and researches products to bring you our best recommendations and advice. When you buy through our links, we may earn a commission. Our process

'ZDNET Recommends': What exactly does it mean?

ZDNET's recommendations are based on many hours of testing, research, and comparison shopping. We gather data from the best available sources, including vendor and retailer listings as well as other relevant and independent reviews sites. And we pore over customer reviews to find out what matters to real people who already own and use the products and services we’re assessing.

When you click through from our site to a retailer and buy a product or service, we may earn affiliate commissions. This helps support our work, but does not affect what we cover or how, and it does not affect the price you pay. Neither ZDNET nor the author are compensated for these independent reviews. Indeed, we follow strict guidelines that ensure our editorial content is never influenced by advertisers.

ZDNET's editorial team writes on behalf of you, our reader. Our goal is to deliver the most accurate information and the most knowledgeable advice possible in order to help you make smarter buying decisions on tech gear and a wide array of products and services. Our editors thoroughly review and fact-check every article to ensure that our content meets the highest standards. If we have made an error or published misleading information, we will correct or clarify the article. If you see inaccuracies in our content, please report the mistake via this form.

Close

Docker 101: Why you should be using containers

Jack Wallen begins a new series that will navigate the process of working with containerized applications and services. But first, a simplified introduction to containers.
Written by Jack Wallen, Contributing Writer

In this new series, I'm going to guide you through the process of learning how to use Docker to deploy containerized applications. I've been using Docker for years to deploy applications and services that I need to be productive. With the help of Docker, I've been able to quickly make use of project management platforms, invoicing, office suites, automation tools, and just about everything in between. In fact, with the help of containers, I've been able to deploy a host of services and tools I need for everyday productivity and collaboration (either for business or personal usage).

But what exactly is a container and what does Docker have to do with them? Let me explain.

What are containers?

Let me explain containers in such a way that anyone can understand them. Simply put, containers are packaged applications and/or services that contain everything they need to run (including code, runtime, system tools, system libraries, and settings) properly and can be deployed (think "installed") almost anywhere. 

Think about it this way. Say, for example, you want to install WordPress. To do this the traditional way, you'd have to first install a full LAMP (Linux Apache MySQL PHP) stack, create the database, and then install WordPress on top of that. Or, you could deploy WordPress as a container with a single command or by building a much more complex installation using what's called a Dockerfile (we'll talk about that later on in the series).

That single command (such as docker run -d -p 80:80 wordpress:latest) makes it possible for you to quickly deploy WordPress in seconds. And that's really the heart of containers…to greatly simplify the deployment of apps and services and make them portable (so they can be installed on any platform that supports the Docker engine).

What is the Docker Engine?

The Docker Engine is a crucial component, for the deployment of your containers, as it is a set of tools that makes use of operating system virtualization in order to deploy containers. There are a number of such engines (such as Podman and containerd) but for our purposes, we're going to focus on the Docker Engine. 

Almost all desktop and server operating systems support the Docker Engine, such as Linux, macOS, and Windows, and even make it simple to install and use the engine. 

For the average user, think of Docker Engine as the tool you use to launch your containers. It's very complex under the hood, but on the surface, you should find it fairly simple (even on the command line level).

It is all commands?

In a word, no. There is, however, a big caveat to that. Yes, there are plenty of GUI tools available for the managing and deploying of Docker containers (we'll cover one or two later on) and, in fact, your best bet for using Docker on both macOS and Windows is by way of Docker Desktop (a fantastic GUI application that installs Docker Engine for you). And even if Linux is your operating system of choice, there are GUI tools that can be used. However, when taking your first steps with containers, it's always best to at least learn some of the basics with the command line interface. However, as you saw earlier (with WordPress), it's not that much of a challenge. 

Why use containers?

In my WordPress example, one of the obvious reasons for using containers is simplicity. Instead of having to install all of the requirements for the world's most popular blogging platform, you can deploy it with a single command.

But there are other reasons to use containers. For example, containers make it easier to scale an application to meet demand. Say you deploy WordPress to a Docker Swarm (a cluster of Docker machines that work together). With that deployment, you could easily scale WordPress from a single node to multiple nodes to better handle higher demands placed by users. 

Another great reason to use containers is for development. Let's stick with our WordPress example. Say you want to build a new WordPress site but you first want to test it on your local network before unleashing it on the public. You could quickly deploy WordPress as a container, get creative with the site, and (once you know it's ready) then deploy it for the public. Containers are absolutely great for development and testing purposes. 

Although containers tend to be mostly used by businesses, I've found them to be incredibly helpful as a means to deploy very helpful applications and services on my LAN (for use by my family even). At the moment, I have containers deployed for invoicing, collaboration, productivity, and communication on my LAN. Each of these platforms was deployed quickly and easily, thanks to containers.

And my container deployment tool of choice is Docker.

In this series, I'm going to walk you through the installation of Docker and how to use both the command line and GUI tools to deploy containers. As I've done with this explanation, I'll be approaching this as if you have zero experience with the technology. One thing to keep in mind is that the first few articles will focus on using Docker from the command line, which means Linux. So, to prepare for that you'll want to get either a Linux Desktop or Server up and running (preferably of the Ubuntu flavor), so you're ready to go.

Until then, get ready to start exploring the world of containers.

Editorial standards