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.
Description
.dockerignoreends with a bare.DS_Storepattern. 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_Storefile at any depth reaches a build context or an image.Root Cause
The pattern needs to be
**/.DS_Storeto match at any depth. The single-line fix is cosmetic on its own, but it had a real second-order effect:database/.DS_Storebeing copied into the MongoDB image is what kept the otherwise-emptydatabase/directory alive on developer machines, masking the fresh-clone build failure in themake mongodbissue and letting it stay latent since2fc98f8. It also reachedmongorestore, which loggeddon'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.