Add serveraddress to auth header of docker API (#543)

* Add serverURL to RegistryAuth

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup

Signed-off-by: Matej Vasek <mvasek@redhat.com>
This commit is contained in:
Matej Vasek 2021-09-20 16:52:36 +02:00 committed by GitHub
parent 25f8b4d6ea
commit 8e882bc934
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -210,7 +210,13 @@ func (n *Pusher) Push(ctx context.Context, f fn.Function) (digest string, err er
}
n.progressListener.Increment("Pushing function image to the registry")
b, err := json.Marshal(&credentials)
authConfig := types.AuthConfig{
Username: credentials.Username,
Password: credentials.Password,
ServerAddress: registry,
}
b, err := json.Marshal(&authConfig)
if err != nil {
return "", err
}