Skip to content
hostcomplex

What Is Docker?

Maarten Soetens 2 min read

What Docker Is and Why Developers Use It

What is Docker? It is a platform for building, sharing and running containers. Its core engine is open source, and it made containers widely known in the 2010s. Today it is one of the most common ways to package applications for development and deployment.

Developers use Docker to package an application with everything it needs, so that it runs the same way on a laptop, a test server and a production host. Hosting teams use it to deploy applications onto servers in a repeatable way and to run several isolated services on one machine.

The Main Parts of the Docker Platform

Docker is made of a few connected parts:

  • Docker Engine: a background service, called the daemon, that builds images and runs containers. A command-line client and an API let people and other tools control it.
  • Dockerfile: a plain text file that lists the steps for building an image, such as starting from a base image, copying in the application and installing its dependencies.
  • Image: a read-only, layered package created from a Dockerfile.
  • Container: a running instance of an image.
  • Registry: a server that stores and distributes images. Docker Hub is a public example, and organizations often run private registries.

Images are built in layers, and layers can be reused. If two images share the same base, that base is stored once. This keeps images smaller and faster to download.

For the difference between an image and a running container, see Docker image vs container. Running several linked containers together is covered in what Docker Compose is.

Example: Running a PHP Application Without Server Conflicts

A hosting customer has a PHP application that needs a specific PHP version and several extensions. Without containers, the server must match those requirements exactly, and a change to the server can break the application. With Docker, the team describes the environment in a Dockerfile, builds an image and runs it as a container. The server only needs Docker, because the application's requirements travel inside the image. A new version can be tested as a separate container before it replaces the old one.

Frequently asked questions

Is Docker the same as a container?

No. A container is the isolated running environment itself. Docker is a platform that creates, runs and manages containers, using images as the packages they start from. Other tools also run containers, so Docker is one implementation of the container idea rather than the idea itself. A general introduction is in what a container is.

Does Docker run on every operating system?

Docker Engine runs natively on Linux. Docker Desktop lets Windows and macOS users run Linux containers through a lightweight Linux virtual machine. Because containers share the host kernel, a Linux container always needs a Linux kernel somewhere underneath it.

  • Two-Factor Authentication

    Two factor authentication hosting adds a second check to control panel, domain and CMS logins. Learn which methods are strongest and why 2FA helps.

  • What Is an A Record?

    What is an A record? Learn how this DNS record maps a hostname to an IPv4 address, why domains use several A records and the root and www pattern.

  • Billing and Automation Platforms

    What is WHMCS? Learn how this commercial billing and automation platform helps hosts sell plans, collect payments and create accounts automatically.