|
|
|
@ -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"
|
|
|
|
|