runway.cfngin.hooks.docker package

Docker hook.

class runway.cfngin.hooks.docker.LoginArgs(*, context: Optional[CfnginContext] = None, dockercfg_path: Optional[str] = None, ecr: Optional[Union[bool, Dict[str, Optional[str]]]] = None, email: Optional[str] = None, password: str, registry: Optional[str] = None, username: Optional[str] = None, **_: Any)[source]

Bases: runway.cfngin.hooks.docker.data_models.BaseModel

Args passed to the docker.login hook.

dockercfg_path

Path to a non-default Docker config file.

email

The email for the registry account.

password

The plaintext password for the registry account.

registry

URI of the registry to login to.

username

The registry username.

Instantiate class.

Parameters
  • context – CFNgin context object.

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

  • ecr – Information describing an ECR registry. This is used to construct the registry URL. If providing a value for this field, do not provide a value for registry.

  • email – The email for the registry account.

  • password – The plaintext password for the registry account.

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

  • username – The registry username. Defaults to AWS if supplying ecr.

static determine_registry(context: Optional[CfnginContext] = None, ecr: Optional[Union[bool, Dict[str, Optional[str]]]] = None, registry: Optional[str] = None)Optional[str][source]

Determine repository URI.

__eq__(other: typing.Any)bool

Evaluate equal comparison operator.

__getitem__(name: str)bool

Implement evaluation of self[name].

Parameters

name – The value to look for.

Raises

KeyError – Object does not contain a field of the name provided.

__iter__()ItemsView[str, typing.Any]

Iterate object.

__setitem__(name: str, value: typing.Any)None

Implement assignment to self[key].

Parameters
  • name – Attribute name to associate with a value.

  • value – Value of a key/attribute.

dict()Dict[str, Any]

Return object as a dict.

find(query: str, default: Optional[typing.Any] = None, **kwargs: typing.Any)typing.Any

Find a value in the object.

get(name: str, default: Optional[typing.Any] = None)typing.Any

Get a value or return default if it is not found.

Attr:

name: The value to look for. default: Returned if no other value is found.

classmethod parse_obj(obj: Any, context: Optional[CfnginContext] = None)Model

Parse object.

runway.cfngin.hooks.docker.login(*, context: CfnginContext, **kwargs: Any)DockerHookData[source]

Docker login hook.

Replicates the functionality of docker login cli command.

kwargs are parsed by LoginArgs.