dockerauth
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package dockerauth handles storing auth configuration information for Dockerregistries.
Usage¶
This package pulls authentication information from the passed configuration.A user should set the "EngineAuthType" and "EngineAuthData" configurationkeys to values indicated below.
These keys may be set by either setting the environment variables"ECS_ENGINE_AUTH_TYPE" and "ECS_ENGINE_AUTH_DATA" or by setting the keys "EngineAuthData" and "EngineAuthType" in the JSON configuration file located at the configured "ECS_AGENT_CONFIG_FILE_PATH" (seehttp://godoc.org/github.com/aws/amazon-ecs-agent/agent/config)
Auth Types¶
The two currently supported auth types are "docker" and "dockercfg".
Docker:
The auth type "docker" is intended to work most naturally with a JSONconfiguration file. The "AuthData" is a structured JSON object which specifiesvalues for the docker "AuthConfig" structure. The "AuthData" should be an objectsimilar to the following:
{"my.registry.example.com": {"username": "myUsername","password": "myPassword"},"https://index.docker.io/v1/user": {"username": "my-dockerhub-username","password": "my-dockerhub-password","email": "my-optinallyincluded-email"}}Dockercfg:
The auth type "dockercfg" is intended to allow easy use of an existing".dockercfg" file generated by running "docker login". This auth type expectsthe "AuthData" to be a string containing the contents of that file. The contentsof your ".dockercfg" will generally be a string of the following form:
'{"http://myregistry.com/v1/":{"auth":"dXNlcjpzd29yZGZpc2g=","email":"email"}}'Portions copyright 2012-2015 Docker, Inc. Please see LICENSE for applicablelicense terms and NOTICE for applicable notices.
Package dockerauth handles storing auth configuration information for Dockerregistries
Index¶
Constants¶
const IndexName = "docker.io"This is taken from Docker's codebase in whole or in part, Copyright Docker Inc.https://github.com/docker/docker/blob/v1.8.3/registry/config.go#L290
const (// MinimumJitterDuration is the minimum duration to mark the credentials// as expired before it's actually expiredMinimumJitterDuration = 30 *time.Minute)
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeDockerAuthProvider¶
type DockerAuthProvider interface {GetAuthconfig(imagestring, registryAuthData *apicontainer.RegistryAuthenticationData) (registry.AuthConfig,error)}DockerAuthProvider is something that can give the auth information for a given docker image
funcNewDockerAuthProvider¶
func NewDockerAuthProvider(authTypestring, authDatajson.RawMessage)DockerAuthProvider
funcNewECRAuthProvider¶
func NewECRAuthProvider(ecrFactoryecr.ECRFactory, cacheasync.Cache)DockerAuthProvider
NewECRAuthProvider returns a DockerAuthProvider that can handle retrievecredentials for pulling from Amazon EC2 Container Registry