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.
- The .dockerignore file controls what makes it into your build. It is common to exclude large and sensitive files.
- Don’t put docker-compose.yml in .dockerignore. Your app can’t be configured correctly without it in the build.
- The code sync feature of
convox startwill not sync files and directories listed in .dockerignore.