Instead of using Volume, you can use COPY. You can use it with dockerignore file to exclude the subdirectories.
By using the .dockerignore file which is mentioned at the end of a Dockerfile, all the unwanted files can be excluded from the final image.
This is how your dockerignore file should look:
.*
docs
mkdocs.yml
docker-compose.yml
test*
*.md