Skip to content

Possible .dockerignore misconfiguration #1920

@tomokinakamaru

Description

@tomokinakamaru

Hello, and thank you for your work on this repository!

As part of my research, I am analyzing how developers configure .dockerignore in popular repositories.

During my analysis, I noticed that /.dockerignore might have been written under the assumption that .dockerignore and .gitignore follow the same pattern semantics, while they actually differ.1 In particular, the following pattern drew my attention:

node_modules/

According to Docker's specification, this pattern matches node_modules only in the top-level directory. (To ignore node_modules in any directory, the .dockerignore file needs to list **/node_modules)

Was this pattern written intentionally? If not, I'd be happy to submit a pull request to adjust it.

And if possible, could you tell me whether you were aware of the difference between .dockerignore and .gitignore? (I would like to know whether the differences are generally well recognized, or if they tend to slip developers' minds.)

Thank you again for maintaining this repository!

Footnotes

  1. See .gitignore doc, .dockerignore doc, and a blog post about the differences

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions