Docker compose in 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 (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 "" 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 :

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.

Leave a Reply