> For the complete documentation index, see [llms.txt](https://raviram.gitbook.io/docker/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://raviram.gitbook.io/docker/build-an-image/what-is-a-docker-file.md).

# What is a docker file?

## What is a docker file?

<figure><img src="https://2721753036-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuZTU0eqcejCs2kCavVbN%2Fuploads%2FlViEU6HxVygQDOJRqrGJ%2Fimage.png?alt=media&amp;token=33c9b471-5064-4bf6-a11a-48386d7e9a26" alt=""><figcaption></figcaption></figure>

It is a straightforward text file containing a collection of commands or procedures. These commands and guidelines we run act on the base image configured to create a new Docker image. A **Dockerfile** is the Docker image’s source code. A Dockerfile is a text file containing various instructions and configurations. The **FROM** command in a Dockerfile identifies the base image from which you are constructing.

When you run the Docker **run** command, Docker uses this file to build the image itself. The Dockerfile includes the image’s creation instructions. The benefit of utilizing a Dockerfile over merely keeping the binary image is that **automated builds** guarantee you always have the most up-to-date version. This is advantageous in terms of security, as you do not want to install any insecure applications.
