Docker Ignore File
2.0 | 1 Vote
What is a DOCKERIGNORE file?
A DOCKERIGNORE file is a build configuration file used by Docker, an application packaging and distribution platform. It contains a list of files and directories Docker will ignore when building an associated application. DOCKERIGNORE files are typically named .dockerignore.
Developers use Docker to build and distribute applications via containers. When building an application with Docker, developers may want to tell Docker to ignore certain files and directories included in the application's project directory. (Ignoring these files and directories speeds up the build process, by avoiding sending unnecessary files to Docker's build client.)
To do so, developers create a DOCKERIGNORE file. Each DOCKERIGNORE file is a plain text file that typically begins with the text # .dockerignore and then specifies the list of files and directories the Docker build client should ignore when building the associated application. Usually, developers create a single DOCKERIGNORE file for use with each app project, and they place it in the app's root directory. However, in some cases, developers may end up creating multiple DOCKERIGNORE files for use with a project (e.g., if the project uses multiple Dockerfiles).
Common DOCKERIGNORE Filenames
.dockerignore - The default name for DOCKERIGNORE files stored in a Docker project's root directory.