From 9ec13a00536b6c93b7719ddd59ad69ec1e95f500 Mon Sep 17 00:00:00 2001 From: Stefan Scherer Date: Fri, 5 Oct 2018 08:20:25 +0200 Subject: [PATCH] Fix docker login --- deploy.ps1 | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/deploy.ps1 b/deploy.ps1 index 2bd68bc..900e110 100644 --- a/deploy.ps1 +++ b/deploy.ps1 @@ -9,8 +9,20 @@ $image = "stefanscherer/whoami" Write-Host Starting deploy if (!(Test-Path ~/.docker)) { mkdir ~/.docker } -'{ "experimental": "enabled" }' | Out-File ~/.docker/config.json -Encoding Ascii -docker login -u="$env:DOCKER_USER" -p="$env:DOCKER_PASS" +# "$env:DOCKER_PASS" | docker login --username "$env:DOCKER_USER" --password-stdin +# docker login with the old config.json style that is needed for manifest-tool +$auth =[System.Text.Encoding]::UTF8.GetBytes("$($env:DOCKER_USER):$($env:DOCKER_PASS)") +$auth64 = [Convert]::ToBase64String($auth) +@" +{ + "auths": { + "https://index.docker.io/v1/": { + "auth": "$auth64" + } + }, + "experimental": "enabled" +} +"@ | Out-File -Encoding Ascii ~/.docker/config.json $os = If ($isWindows) {"windows"} Else {"linux"} docker tag whoami "$($image):$os-$env:ARCH-$env:APPVEYOR_REPO_TAG_NAME"