kaniko icon indicating copy to clipboard operation
kaniko copied to clipboard

Dotnet: access denied to obj folder during nuget restore

Open suineglive13 opened this issue 2 years ago • 0 comments

Actual behavior When I'm trying to build my dockerfile with dotnet project using kaniko, I'm getting an error: A clear and concise description of what the bug is. "/app/treaty-bff.sln" (Restore target) (1) -> (Restore target) -> /usr/share/dotnet/sdk/6.0.402/NuGet.targets(132,5): error : Access to the path '/app/Myproject.Common/obj' is denied. [/app/treaty-bff.sln] /usr/share/dotnet/sdk/6.0.402/NuGet.targets(132,5): error : Permission denied [/app/Myproject.sln]

Expected behavior A clear and concise description of what you expected to happen. Using just docker build I'm able to build the image.

To Reproduce Steps to reproduce the behavior: Command used to run build: docker run --rm -v $PWD:/workspace -v $PWD/config.json:/kaniko/.docker/config.json:ro gcr.io/kaniko-project/executor:v1.18.0 --no-push --skip-tls-verify at first tried with 1.14, but it's still the same, nugets themselves are downloading without issues. Unfortunately I'm not able to share the dockerfile or the code, but would be nice to get an advice in what direction to look.

suineglive13 avatar Nov 29 '23 17:11 suineglive13