Git Product home page Git Product logo

Comments (6)

INPRASHANDHI avatar INPRASHANDHI commented on June 14, 2024

Anyone can Advise on this..

from cloudadoptionframework.

BryanSoltis avatar BryanSoltis commented on June 14, 2024

Hello @INPRASHANDHI,

Thank you for writing. I'm not a Docker/container expert, but in researching this error, it usually occurs when the container host cannot access the internet and complete the dotnet restore. The Azure Namign Tool is a .NET 6 Blazor Server application. The container for this is based on the mcr.microsoft.com/dotnet/sdk:6.0 image.

In researching your error, it seems to occur when there is a proxy server the container is attempting to communicate out through. Is this the case? If not, is there are any firewall/gateway in place that could be preventing external access? I can tell you that there are no special paths/URLs with the Azure Naming Tool that it is attempting to load as part of the container creation process.

A good test may be to create a standard container and see if it gives the same error:

https://learn.microsoft.com/en-us/dotnet/core/docker/build-container?tabs=windows

Hope this helps!

  • Bryan

from cloudadoptionframework.

INPRASHANDHI avatar INPRASHANDHI commented on June 14, 2024

Hello @BryanSoltis Thank you for the reply. I was able to fix the issue and it was the https proxy address issue that was not added.

from cloudadoptionframework.

BryanSoltis avatar BryanSoltis commented on June 14, 2024

Glad you got it working!

-Bryan

from cloudadoptionframework.

dexteravelasco avatar dexteravelasco commented on June 14, 2024

How did you fix it?

I am getting

C:\Users\Dexter.Velasco\Downloads\CloudAdoptionFramework-master\CloudAdoptionFramework-master\ready\AzNamingTool>docker build -t azurenamingtool .
[+] Building 54.8s (12/17)
=> [internal] load .dockerignore 0.0s
=> => transferring context: 358B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 700B 0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0 0.6s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0 0.6s
=> [build 1/7] FROM mcr.microsoft.com/dotnet/sdk:6.0@sha256:a3bbff689a86ba7f3ddcee5089a729b20e20e3b4dbfb9d0a43bb3284d9081023 0.0s
=> [internal] load build context 0.1s
=> => transferring context: 11.05kB 0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0@sha256:f76f95813a87d711928c6b02335614f328cc1c9c53315137fd64ea13b2be09f9 0.0s
=> CACHED [base 2/2] WORKDIR /app 0.0s
=> CACHED [final 1/2] WORKDIR /app 0.0s
=> CACHED [build 2/7] WORKDIR /src 0.0s
=> CACHED [build 3/7] COPY [AzureNamingTool.csproj, .] 0.0s
=> ERROR [build 4/7] RUN dotnet restore "./AzureNamingTool.csproj" 54.1s

[build 4/7] RUN dotnet restore "./AzureNamingTool.csproj":
#0 0.850 Determining projects to restore...
#0 8.204 /src/AzureNamingTool.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json.
#0 17.25 /src/AzureNamingTool.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json.
#0 24.63 /src/AzureNamingTool.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json.
#0 31.75 /src/AzureNamingTool.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json.
#0 39.21 /src/AzureNamingTool.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json.
#0 46.63 /src/AzureNamingTool.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json.
#0 54.01 /src/AzureNamingTool.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json.
#0 54.05 Failed to restore /src/AzureNamingTool.csproj (in 52.93 sec).


Dockerfile:11

9 | WORKDIR /src
10 | COPY ["AzureNamingTool.csproj", "."]
11 | >>> RUN dotnet restore "./AzureNamingTool.csproj"
12 | COPY . .
13 | WORKDIR "/src/."

ERROR: failed to solve: process "/bin/sh -c dotnet restore "./AzureNamingTool.csproj"" did not complete successfully: exit code: 1

C:\Users\Dexter.Velasco\Downloads\CloudAdoptionFramework-master\CloudAdoptionFramework-master\ready\AzNamingTool>

from cloudadoptionframework.

binteezyy avatar binteezyy commented on June 14, 2024

Hello @BryanSoltis Thank you for the reply. I was able to fix the issue and it was the https proxy address issue that was not added.

What exactly was the fix?

from cloudadoptionframework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.