You might want the check the VOLUME section in Dockerfile reference again.
This declaration does not actualy mount the host folder into the container. It just marks that it is expects a volume to be mapped into this folder when a container is created from this image. If you don’t map a volume when creating the folder, docker will create an anonymouns volume and map it into the folder (those are volumes with alpanumeric names when you execute
docker volume ls).
Typicaly you use the COPY instruction to copy files from the build context into your build container during build time. Though, the files need to be available in the build context, which is the folder and its subfolders where the Dockerfile is stored. Make sure to declare a .dockerignore file that list all files you don’t want to be visible inside the build context.