Reputation: 41
I want to ignore all the folders in src/modules
except mall
folder when build images. I try like below, but it doesn't work.
src/modules
!src/modules/mall
Any help will be appreciated.
Upvotes: 4
Views: 4933
Reputation: 88
Try using wildcards, and both for exclusions and inclusions in this case.
Also, .dockerignore supports ** wildcards for any number of directories depth like go does.
So try this:
src/modules/**
!src/modules/mall/**
If this doesn't work, could you elaborate in what doesnt work?
Upvotes: 4