Publishing Docker images
After developing your application, the next step is to deploy the application so that your user can start using it. To do this, you need to package your application. This is where Docker comes into the picture. Docker is a tool that is used to package your application into a single file, making it easy to deploy into a cloud environment such as Amazon, Google, and so on. We will look at Docker images and containers in depth in Chapter 13, Dockerizing an Application. We will look at the file with which we configure Docker, called the Dockerfile
. We will briefly look at what this file does.
Dockerfile
Dockerfile
is the default filename used to name a file that contains instructions for building an image for your application. The Dockerfile
contains instructions on steps for Docker to perform to package your application into a Docker image.
Let’s take a look at the Dockerfile
that we have inside the Chapter12
directory:
# 1. Compile the app...