docker.login

Hook Path

runway.cfngin.hooks.docker.login

Docker login hook.

Replicates the functionality of the docker login CLI command.

New in version 1.18.0.

Args

dockercfg_path: Optional[str] = None

Use a custom path for the Docker config file ($HOME/.docker/config.json if present, otherwise $HOME/.dockercfg).

ecr: Optional[Dict[str, Optional[str]]] = None

Information describing an ECR repository. This is used to construct the repository URL. If providing a value for this field, do not provide a value for repo or image.

If using a private registry, only repo_name is required. If using a public registry, repo_name and registry_alias.

account_id: Optional[str] = None

AWS account ID that owns the registry being logged into. If not provided, it will be acquired automatically if needed.

alias: Optional[str] = None

If it is a public registry, provide the alias.

aws_region: Optional[str] = None

AWS region where the registry is located. If not provided, it will be acquired automatically if needed.

email: Optional[str] = None

The email for the registry account.

password: str

The plaintext password for the registry account.

registry: Optional[str] = None

URL to the registry (e.g. https://index.docker.io/v1/).

If providing a value for this field, do not provide a value for ecr.

username: Optional[str] = None

The registry username. Defaults to AWS if supplying ecr.

Example

pre_deploy:
  - path: runway.cfngin.hooks.docker.login
    args:
      ecr: true
      password: ${ecr login-password}