wincred missing from Windows Server 2019 image

mcarpenter's Avatar

mcarpenter

04 Mar, 2019 02:04 PM

When building Docker images on the new Windows Server 2019 image, I was getting errors when trying to "docker login" to a private registry. I received the following initially (when using the --password-stdin docker login switch, otherwise you'll get a different error): WARNING! Your password will be stored unencrypted in C:\Users\appveyor\.docker\config.json

So, I scripted the creation of that file, setting "credsStore": "wincred". After doing that, I got the following error: Error saving credentials: error storing credentials - err: exec: "docker-credential-wincred": executable file not found in %PATH%

Then I included a copy of docker-credential-wincred.exe in my source repository, and ran Copy-Item "$env:APPVEYOR_BUILD_FOLDER\tools\wincred\docker-credential-wincred.exe" -Destination "C:\program files\docker"

Things seemed to work fine after that. I think C:\program files\docker\docker-credential-wincred.exe should probably exist by default to save others the trouble. Let me know if you have any questions - thanks!

  1. Support Staff 1 Posted by Ilya Finkelshte... on 05 Mar, 2019 12:45 AM

    Ilya Finkelshteyn's Avatar

    Thanks a lot for the feedback! I would recommend this script instead of checking binary into repo:

    Write-Host "Downloading docker-credential-wincred"
    (New-Object Net.WebClient).DownloadFile('https://github.com/docker/docker-credential-helpers/releases/download/v0.6.0/docker-credential-wincred-v0.6.0-amd64.zip', "$env:TEMP\docker-credential-wincred-v0.6.0-amd64.zip")
    Expand-Archive -Path "$env:TEMP\docker-credential-wincred-v0.6.0-amd64.zip" -DestinationPath "$env:ProgramFiles\Docker" -Force
    Remove-Item "$env:TEMP\docker-credential-wincred-v0.6.0-amd64.zip"
    

    You can run it at install stage. And yes, we will consider adding it into the image.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

26 Mar, 2019 06:34 AM
26 Mar, 2019 06:27 AM
25 Mar, 2019 09:12 PM
25 Mar, 2019 06:34 PM
25 Mar, 2019 06:20 AM

 

24 Mar, 2019 06:52 PM
24 Mar, 2019 05:26 PM
24 Mar, 2019 03:07 AM
22 Mar, 2019 02:20 PM
22 Mar, 2019 11:00 AM
22 Mar, 2019 02:51 AM