I'm working on a .net core 3.1 project for a company. I have a pretty simple dockerfile configured that leverages RUN dontnet restore to retrieve all the necessary nuget packages for my project. This works fine for me. It will build and run the container no problem.
The problem comes when the company pulls my solution to their network and they try to run the same dockerfile. Their firewall rules block SSL connections to external sites (with explicit exceptions that nuget is not part of). So when they try to build the container they get failure when the restore tries to access "https://api.nuget.org/v3/index.json". Which makes sense to me for the reasons above.
If I update my dotnet build to include nuget packages as part of the published output, can I have the dockerfile update to reference that published output for nuget packages instead of doing a dotnet restore from nuget itself? Essentially is there a good way to handle the docker build process so it can be done offline (i.e. without relying on external sources)?
dotnet restore
? Why not use self-contained deployment?