docker-archive / dotnet-musicstore

Music Store web app written in .NET Core
Other
28 stars 38 forks source link

Docker Build - Unable to load the service index for source https://api.nuget.org/v3/index.json. #5

Open maulik-modi opened 6 years ago

maulik-modi commented 6 years ago

Steps to reproduce:

  1. Create a Virtual machine with Windows Server 2016 and Install Docker Enterprise edition
  2. Checkout Musicstore git repository
  3. Run command docker build -f Dockerfile.windows -t dotnetmusicstore20180515 .

Expected result: All steps of docker build are successfully completed and Image with tag dotnetmusicstore20180515 is available

Actual result: Sending build context to Docker daemon 2.168MB Step 1/15 : FROM microsoft/dotnet:sdk-nanoserver ---> 8f13c75d6f1d Step 2/15 : SHELL powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; ---> Using cache ---> 6f76ac31e2c4 Step 3/15 : RUN New-Item -Path \MusicStore\samples\MusicStore -Type Directory; New-Item -Path build -Type Directory ---> Using cache ---> 5b38f86b224e Step 4/15 : WORKDIR MusicStore ---> Using cache ---> 6406891d6398 Step 5/15 : COPY samples/MusicStore/MusicStore.csproj samples/MusicStore/MusicStore.csproj ---> Using cache ---> 5ba9afed64c7 Step 6/15 : COPY NuGet.config . ---> Using cache ---> 0362b902118a Step 7/15 : COPY version.props . ---> Using cache ---> d643d585c194 Step 8/15 : COPY build/*.props build/ ---> Using cache ---> a6c3a8d6d4ff Step 9/15 : RUN dotnet restore --runtime win10-x64 .\samples\MusicStore ---> Running in fbe67aff85fc Restoring packages for C:\MusicStore\samples\MusicStore\MusicStore.csproj... C:\Program Files\dotnet\sdk\1.1.9\NuGet.targets(102,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [C:\MusicStore\samples\MusicStore\MusicStore.csproj] C:\Program Files\dotnet\sdk\1.1.9\NuGet.targets(102,5): error : An error occurred while sending the request. [C:\MusicStore\samples\MusicStore\MusicStore.csproj] C:\Program Files\dotnet\sdk\1.1.9\NuGet.targets(102,5): error : A security error occurred [C:\MusicStore\samples\MusicStore\MusicStore.csproj] The command 'powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; dotnet restore --runtime win10-x64 .\samples\MusicStore' returned a non-zero code: 1

Docker Network PS C:\Users\Administrator\Desktop\Cyg\dotnet-musicstore> docker network ls NETWORK ID NAME DRIVER SCOPE d8ffebd5deaa nat nat local c9bde64b236b none null local

docker version PS C:\Users\Administrator\Desktop\Cyg\dotnet-musicstore> docker --version Docker version 17.06.2-ee-10, build 66261a0

docker info PS C:\Users\Administrator\Desktop\Cyg\dotnet-musicstore> docker info Containers: 11 Running: 0 Paused: 0 Stopped: 11 Images: 37 Server Version: 17.06.2-ee-10 Storage Driver: windowsfilter Windows: Logging Driver: json-file Plugins: Volume: local Network: l2bridge l2tunnel nat null overlay transparent Log: awslogs etwlogs fluentd json-file logentries splunk syslog Swarm: inactive Default Isolation: process Kernel Version: 10.0 14393 (14393.447.amd64fre.rs1_release_inmarket.161102-0100) Operating System: Windows Server 2016 Standard OSType: windows Architecture: x86_64 CPUs: 1 Total Memory: 4GiB Name: DOCKER ID: DUY3:2JTV:D7IM:ZOOA:PFNY:ERQT:RUKH:PMYS:VPJM:J55Q:BADS:2OKW Docker Root Dir: C:\ProgramData\docker Debug Mode (client): false Debug Mode (server): false Registry: https://index.docker.io/v1/ Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false

ganga1980 commented 5 years ago

@sixeyed , any work around for this issue? I am also hitting the same error for dotnet restore when I do the docker build

C:\Program Files\dotnet\sdk\2.1.505\NuGet.targets(114,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [C:\docker-size-test\docker-size-test.csproj] C:\Program Files\dotnet\sdk\2.1.505\NuGet.targets(114,5): error : No such host is known [C:\docker-size-test\docker-size-test.csproj]

Build FAILED.

AmilaDevops commented 5 years ago

Hi all, please see this link guys (if u hav permissions to view). I'm experiencing the same issue here. https://github.com/TownSuite/DevOps/issues/31