I am running Docker for Windows on a Windows 2016 Server and have an issue when pulling images from registry.
As suggested I do a “docker login” before using docker on my Windows and the authentication work fine - I get a “Login succeeded”.
But when I do a “docker pull” I am asked to provide the credentials again which results in an “Error response from daemon: unauthorized: authentication required”
PS C:\Users\lasombraaa> docker pull iis
Using default tag: latest
Please login prior to pull:
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username (lasombraaa):
Password:
Error response from daemon: unauthorized: authentication required
same for “docker run”
PS C:\Users\lasombraaa> docker run powershell
Unable to find image 'powershell:latest' locally
C:\Program Files\Docker\docker.exe: Error response from daemon: unauthorized: authentication required.
See 'C:\Program Files\Docker\docker.exe run --help'.
The %USERPROFILE%.docker\config.json exists and I already deleted it and did a login again.
{
"auths": {
"https://index.docker.io/v1/": {
"auth": "xxxxxxxxxxxxx"
}
}
}
Interestingly, if I use microsoft specific package I do not have an authentication error but rather “image operating system “linux” cannot be used on this platform.”
PS C:\Users\lasombraaa> docker run microsoft/powershell
Unable to find image 'microsoft/powershell:latest' locally
latest: Pulling from microsoft/powershell
C:\Program Files\Docker\docker.exe: image operating system "linux" cannot be used on this platform.
See 'C:\Program Files\Docker\docker.exe run --help'.
Can somebody explain me what happens?
docker version
Client:
Version: 1.12.2-cs2-ws-beta
API version: 1.25
Go version: go1.7.1
Git commit: 050b611
Built: Tue Oct 11 02:35:40 2016
OS/Arch: windows/amd64
Server:
Version: 1.12.2-cs2-ws-beta
API version: 1.25
Go version: go1.7.1
Git commit: 050b611
Built: Tue Oct 11 02:35:40 2016
OS/Arch: windows/amd64
docker info
Containers: 6
Running: 0
Paused: 0
Stopped: 6
Images: 4
Server Version: 1.12.2-cs2-ws-beta
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: nat null overlay
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 14393 (14393.693.amd64fre.rs1_release.161220-1747)
Operating System: Windows Server 2016 Datacenter
OSType: windows
Architecture: x86_64
CPUs: 1
Total Memory: 3.5 GiB
Name: Win2016
ID: UWTQ:LE7V:RU2K:7NZC:TFRH:V4TD:PSGG:DSXG:XWYF:X2NM:ZTQJ:OYMN
Docker Root Dir: C:\ProgramData\docker
Debug Mode (client): false
Debug Mode (server): false
Username: lasombraaa
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false