https://rancher.com/ logo
r

ripe-grass-75099

07/14/2022, 1:28 PM
hi - I'm using Rancher Desktop on windows (1.4.1) and am having weird problems with docker build. It can find google.com from within the container but not api.nuget.org. The ping works fine from the host OS.
Copy code
FROM <http://mcr.microsoft.com/dotnet/sdk:6.0-alpine|mcr.microsoft.com/dotnet/sdk:6.0-alpine>
#RUN ping <http://google.com|google.com>
RUN ping <http://api.nuget.org|api.nuget.org>
and the output
Copy code
C:\temp\docker>docker build .
Sending build context to Docker daemon  2.048kB
Step 1/4 : FROM <http://mcr.microsoft.com/dotnet/sdk:6.0-alpine|mcr.microsoft.com/dotnet/sdk:6.0-alpine>
 ---> 68f959202edb
Step 2/4 : RUN ping <http://api.nuget.org|api.nuget.org>
 ---> Running in 190474634dc2
ping: bad address '<http://api.nuget.org|api.nuget.org>'
The command '/bin/sh -c ping <http://api.nuget.org|api.nuget.org>' returned a non-zero code: 1
A curl in the docker build returns this:
Copy code
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Could not resolve host: <http://api.nuget.org|api.nuget.org>
* Closing connection 0
curl: (6) Could not resolve host: <http://api.nuget.org|api.nuget.org>
Really not sure what is going on as other addresses appear to work fine so it shouldn't be a networking issue, but everything suggests it is
FYI: This isn't an issue with docker desktop so it looks like it's a problem with the way Rancher is setting itself up
b

big-sugar-91946

07/14/2022, 2:10 PM
would suggest looking into Experimental Host Resolver setting in your settings.json file
as it seems to be a dns resolution problem
w

witty-honey-18052

07/14/2022, 3:49 PM
I've seen similar issues in the past when the host machine/image has outdated root CAs, especially those prior to what I think was the letsencrypt older root ca expiration
(just clarifying, not the container image)
r

ripe-grass-75099

07/15/2022, 1:02 PM
@witty-honey-18052 @big-sugar-91946 Thanks. The Lima patch fixes the issue
w

witty-honey-18052

07/15/2022, 1:03 PM
Awesome!
43 Views