Dockerfiles are how we containerize our application, or how we build a new container from an already pre-built image and add custom logic to start our application. From a Dockerfile, we use the Docker build command to create an image.
Think of a Dockerfile as a text document that contains the commands we call on the command line to build an image.
Below is an example of a Dockerfile: