aspnet / aspnet-docker

[Archived] ASP.NET Core Docker images for 1.x. Go to https://github.com/dotnet/dotnet-docker for 2.1 and up.
https://asp.net
719 stars 171 forks source link

unauthorized: authentication required error while pulling microsoft/aspnetcore-build #346

Closed fazalWahid56 closed 6 years ago

fazalWahid56 commented 6 years ago

If you are having an issue with microsoft/aspnet, please open an issue on https://github.com/Microsoft/aspnet-docker. This repository is for microsoft/aspnetcore and microsoft/aspnetcore-build.

Steps to reproduce the issue

Command: docker build -t core .

docker file

FROM microsoft/aspnetcore-build AS build-env WORKDIR /WEBAPI

Copy csproj and restore as distinct layers

COPY *.csproj ./ RUN dotnet restore

Copy everything else and build

COPY . ./ RUN dotnet publish -c Release -o out

Build runtime image

FROM microsoft/aspnetcore:2.0 WORKDIR /WEBAPI COPY --from=build-env /app/out . ENTRYPOINT ["dotnet", "core.dll"]

Expected behavior

To build my core app into docker image

Actual behavior

it takes sometime downloading files but end up with this error

a107ec7d7f6a: Waiting 95a50a90fcb0: Waiting ab34d56b4e5c: Waiting 0b8ec05e19e4: Waiting unauthorized: authentication required

Additional information (e.g. issue happens only occasionally)

i tried this docker login -u dockerUserName -p password but error persists.

Output of dotnet --info

.NET Command Line Tools (2.0.3)

Product Information:
 Version:            2.0.3
 Commit SHA-1 hash:  12f0c7efcc

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.16299
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.0.3\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.3
  Build    : a9190d4a75f4a982ae4b4fa8d1a24526566c69df

Output of docker info

Containers: 3
 Running: 0
 Paused: 0
 Stopped: 3
Images: 15
Server Version: 17.09.1-ce
Storage Driver: windowsfilter
 Windows:
Logging Driver: json-file
Plugins:
 Volume: local
 Network: ics l2bridge l2tunnel nat null overlay transparent
 Log: awslogs etwlogs fluentd json-file logentries splunk syslog
Swarm: inactive
Default Isolation: hyperv
Kernel Version: 10.0 16299 (16299.15.amd64fre.rs3_release.170928-1534)
Operating System: Windows 10 Pro
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 9.87GiB
Name: FAZAL-PC
ID: 3UFQ:SR6V:EJU4:VGKM:KGKH:GZNU:BDVK:PROM:SNTZ:VN7P:5JCM:PWTK
Docker Root Dir: C:\ProgramData\Docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: -1
 Goroutines: 24
 System Time: 2017-12-23T23:51:20.2693807+05:00
 EventsListeners: 0
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
natemcmaster commented 6 years ago

I can't repro this on my own. We haven't done anything to make microsoft/aspnetcore:2.0 require authentication, so I'm assuming it's something in wrong in your Docker client or Docker Hub itself. Try pulling again. It may have been an intermittent error from Docker hub.

Closing as I don't think there is anything we can do, but feel free to continue the discussion here. You might have try checking Docker Hub's help page as well: https://hub.docker.com/help/