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:
TomSweeneyRedHat
2019-03-13 11:40:24 -04:00
parent 8b3f759800
commit 8f418f1568
334 changed files with 4537 additions and 1972 deletions

View File

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