I\'m not able to find many examples of what a .dockerignore file should look like.
Using puppet to install a few packages on a docker container causes the image to
The format of the .dockerignore should be equal to the one of .gitignore. See a sample file and the docker documentation.
The file should be a list of exclusion patterns (relative to the path of the .dockerignore file) separated by a newline.
So you should try the following .dockerignore:
modules/*
The / at the beginning may have been the mistake, as it will only be valid for the root directory of the file (but not for subdirectories, so maybe the recursive version without the / will do a better job instead).