2
votes

I have a dockerfile that runs nuget restore to get some package from private server. The server requires login/password and I have to provide it. On my local machine I am able to mount %appdata%\NuGet\nuget.config to the container. But how to deal with TeamCity? I know there is a build feature NuGet Feed Credentials but where does TeamCity store the file with credentials? How can I pass it to the docker container?

1

1 Answers

0
votes

I solved the issue by adding Command Line Build Step with the following text (just creating the file):

echo '<configuration><packageSources>...</packageSources><packageSourceCredentials...</packageSourceCredentials></configuration>' > path/to/dotnetapp/nuget.config