mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
Vendor docker/docker, fsouza and more #2
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com> Vendors in fsouza/docker-client, docker/docker and a few more related. Of particular note, changes to the TweakCapabilities() function from docker/docker along with the parse.IDMappingOptions() function from Buildah. Please pay particular attention to the related changes in the call from libpod to those functions during the review. Passes baseline tests.
This commit is contained in:
9
vendor/github.com/fsouza/go-dockerclient/auth.go
generated
vendored
9
vendor/github.com/fsouza/go-dockerclient/auth.go
generated
vendored
@ -32,6 +32,9 @@ type AuthConfiguration struct {
|
||||
// see https://godoc.org/github.com/docker/docker/api/types#AuthConfig
|
||||
// It can be used in place of password not in conjunction with it
|
||||
IdentityToken string `json:"identitytoken,omitempty"`
|
||||
|
||||
// RegistryToken can be supplied with the registrytoken
|
||||
RegistryToken string `json:"registrytoken,omitempty"`
|
||||
}
|
||||
|
||||
// AuthConfigurations represents authentication options to use for the
|
||||
@ -50,6 +53,7 @@ type dockerConfig struct {
|
||||
Auth string `json:"auth"`
|
||||
Email string `json:"email"`
|
||||
IdentityToken string `json:"identitytoken"`
|
||||
RegistryToken string `json:"registrytoken"`
|
||||
}
|
||||
|
||||
// NewAuthConfigurationsFromFile returns AuthConfigurations from a path containing JSON
|
||||
@ -162,6 +166,11 @@ func authConfigs(confs map[string]dockerConfig) (*AuthConfigurations, error) {
|
||||
authConfig.IdentityToken = conf.IdentityToken
|
||||
}
|
||||
|
||||
// if registrytoken provided then zero the password and set it
|
||||
if conf.RegistryToken != "" {
|
||||
authConfig.Password = ""
|
||||
authConfig.RegistryToken = conf.RegistryToken
|
||||
}
|
||||
c.Configs[reg] = authConfig
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user