Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Docker compose in asp.net core offline (no internet connexion) : unable to load the service index for source

I am using an offline machine of a company (without internet connexion). When I do docker-compose, I have the error : Unable to load service index for source https://api.nuget.org/v3/index.json. (Which is normal because I have no internet on my machine). The problem is, even though I changed the Nuget.config file (so the path "https://api.nuget.org/v3/index.json" is no longer in Nuget.config), I still have the same error:

Error: Unable to load service index for source

Here you have the docker file of my service :
Dockerfile

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

And the docker-compose:
docker-compose file

Thank you for your help.

>Solution :

When you do the dotnet restore in the Dockerfile, you’ve only copied the .csproj file into the container.

Copy the nuget.config file into the container as well, before doing dotnet restore.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading