dockerauth

package
v1.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2016 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 11 Imported by: 0

Documentation

Overview

Package dockerauth handles storing auth configuration information for Docker registries.

Usage

This package pulls authentication information from the passed configuration. A user should set the "EngineAuthType" and "EngineAuthData" configuration keys 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" (see http://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 JSON configuration file. The "AuthData" is a structured JSON object which specifies values for the docker "AuthConfig" structure. The "AuthData" should be an object similar 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 expects the "AuthData" to be a string containing the contents of that file. The contents of 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 applicable license terms and NOTICE for applicable notices.

Package dockerauth handles storing auth configuration information for Docker registries

Index

Constants

View Source
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

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerAuthProvider added in v1.6.0

type DockerAuthProvider interface {
	GetAuthconfig(image string) (docker.AuthConfiguration, error)
}

DockerAuthProvider is something that can give the auth information for a given docker image

func NewDockerAuthProvider added in v1.6.0

func NewDockerAuthProvider(authType string, authData json.RawMessage) DockerAuthProvider

func NewECRAuthProvider added in v1.7.0

func NewECRAuthProvider(authData *api.ECRAuthData, clientFactory ecr.ECRFactory) DockerAuthProvider

NewECRAuthProvider returns a DockerAuthProvider that can handle retrieve credentials for pulling from Amazon EC2 Container Registry

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL