Docker Ignore File

The .dockerignore file contains a list of patterns that tell Docker which files and directories to exclude from the build context. For a more in-depth explanation of the file’s functionality and pattern syntax, see the official .dockerignore file documentation.

As a Convox user, you’ll want to keep a few key points in mind when dealing with the .dockerignore file.

  1. The .dockerignore file controls what makes it into your build. It is common to exclude large and sensitive files.
  2. Don’t put docker-compose.yml in .dockerignore. Your app can’t be configured correctly without it in the build.
  3. The code sync feature of convox start will not sync files and directories listed in .dockerignore.