docker

package
v1.226.0-test.8 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: Apache-2.0 Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigManager

type ConfigManager struct {
	// contains filtered or unexported fields
}

ConfigManager manages Docker config.json for ECR authentication. It uses file locking to prevent concurrent modification.

func NewConfigManager

func NewConfigManager() (*ConfigManager, error)

NewConfigManager creates a new Docker config manager using the default Docker config path. The config is stored in ~/.docker/config.json by default (or $DOCKER_CONFIG/config.json if DOCKER_CONFIG is set). This ensures compatibility with Docker CLI without requiring additional environment variable configuration.

func (*ConfigManager) GetAuthenticatedRegistries

func (m *ConfigManager) GetAuthenticatedRegistries() ([]string, error)

GetAuthenticatedRegistries returns list of authenticated ECR registries.

func (*ConfigManager) GetConfigDir

func (m *ConfigManager) GetConfigDir() string

GetConfigDir returns the directory containing the Docker config.

func (*ConfigManager) GetConfigPath

func (m *ConfigManager) GetConfigPath() string

GetConfigPath returns the full path to the Docker config file.

func (*ConfigManager) RemoveAuth

func (m *ConfigManager) RemoveAuth(registries ...string) error

RemoveAuth removes ECR authorization from Docker config.

func (*ConfigManager) WriteAuth

func (m *ConfigManager) WriteAuth(registry, username, password string) error

WriteAuth writes ECR authorization to Docker config. The auth entry is stored as base64(username:password).

Jump to

Keyboard shortcuts

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