Movatterモバイル変換


[0]ホーム

URL:


dockerauth

package
v0.0.0-...-44f8eb6Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License:Apache-2.0Imports:17Imported by:5

Details

Repository

github.com/aws/amazon-ecs-agent

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

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

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

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp