How can I exclude a sub-directory with a .dockerignore file March 18, 2023 by Tarik There is a shorter and easier method to write your .dockerignore : vendor/bundle/**/* vendor/bundle