Skip to content

Match nested .DS_Store files in .dockerignore #112

Description

@conradbzura

Description

.dockerignore ends with a bare .DS_Store pattern. Docker matches that only at the build-context root, so nested ones — database/.DS_Store, for instance — are copied into images.

Expected Behavior

No .DS_Store file at any depth reaches a build context or an image.

Root Cause

The pattern needs to be **/.DS_Store to match at any depth. The single-line fix is cosmetic on its own, but it had a real second-order effect: database/.DS_Store being copied into the MongoDB image is what kept the otherwise-empty database/ directory alive on developer machines, masking the fresh-clone build failure in the make mongodb issue and letting it stay latent since 2fc98f8. It also reached mongorestore, which logged don't know what to do with file /data/database/.DS_Store, skipping....

Worth checking the other patterns in the file for the same root-only assumption while making the change.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions