Introduction to Containerizing an Application

An overview of what it means to containerize an application using Docker.

We'll cover the following

Docker is all about taking applications and running them in containers. The process of taking an application and configuring it to run as a container is called “containerizing.”

In this chapter, we’ll walk through the process of containerizing a simple Linux-based web application.

If you don’t have a Linux Docker environment to follow along with, you can use Play With Docker for free. Just point your web browser to https://play-with-docker.com and spin up some Linux Docker nodes. It’s my favorite way to spin up Docker and do testing!

Let’s containerize an app!

Containerizing an app - The TLDR

Containers are all about making apps simple to build, ship, and run.

The process of containerizing an app looks like this:

  1. Start with your application code and dependencies.
  2. Create a Dockerfile that describes your app, its dependencies, and how to run it.
  3. Feed the Dockerfile into the docker image build command.
  4. Push the new image to a registry (optional).
  5. Run the container from the image.

Once your app is containerized (made into a container image), you’re ready to share it and run it as a container.

The figure below shows the process in picture form.

Get hands-on with 1200+ tech skills courses.