Docker build is failing because access to path is denied

Hi there, I am currently trying to build my docker image in windows. Unfortunately when I run the command docker build command, I am presented with Could not write lines to file “xxxxx.csproj.FileListAbsolute.txt”. Access to the path is denied. I am not sure how to get around this.

Is there a way to execute the docker build as administrator? Is there extra permissions to be granted?

Can you share the docker file name and build command?

Also, please share the user who executed the command.

The filename is Dockerfile

and the build command being executed is docker build -t Test -f Test.Api.Rest/Dockerfile .

This works locally but fails within teamcity, dockerbuild