dotnet restore looking in wrong nuget-source

Im running a “dotnet restore” in Docker
Relevant part of my Nuget.Config looks like this

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources> 
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
    <add key="MyNuget" value="https://mynugetsource.com/nuget/v3/index.json" />
  </packageSources>
</configuration>

From my Dockerfile

COPY ["NuGet.Config", "myproject.Api/"]
RUN dotnet restore "myproject.Api/myproject.Api.csproj" --configfile nuget.config

One of the packages is “MassTransit” which I get from nuget.org, but the restore operations gives me the error

Failed to download package ‘MassTransit.5.5.6’ from
https://mycompanysource.com/…/nuget/v3/flat2/masstransit/5.5.6/masstransit.5.5.6.nupkg‘.

The private source have for some reason MassTransit (5.5.5), so Im thinking that confuses things. Can I somehow force nuget to use a specific source for MassTransit? (I need both nuget.org and the private nuget repo)

Source: StackOverflow