dockerignore file doesn't properly ignore folder when removing .git folder

Viewed 165

I'm experiencing this issue where I have a .dockerignore in the root project structure. I'm planning to keep the .git folder when sending the context to docker build command.

The problem happens when I remove the .git folder and run docker build, docker appears to not take in what's in the .dockerignore! But later when I throw .git folder back in there, it does the job and ignores folders/sub-folders.

Here is what .dockerignore looks like:

models/binary_classification/weights/*
models/feature_extraction/weights/*
**/.ipynb_checkpoints
data/*
__pycache__/
.DS_Store
.idea/

Any help is apprecited.

0 Answers
Related