I was able to find the solution with the help of a sonar member. In my case, I was using one of the default images provided by sonar called atlassian/default-image:4. The problem was related to docker image memory so I increased it to 2048, like this:
definitions:
services:
docker:
memory: 8192
And now It works very well and all my files are read.