docker.image.push¶
- Hook Path:
runway.cfngin.hooks.docker.image.push
Docker image push hook.
Replicates the functionality of the docker image push
CLI command.
Added in version 1.18.0.
Args¶
- ecr_repo: dict[str, str | None] | None = 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
orimage
.If using a private registry, only
repo_name
is required. If using a public registry,repo_name
andregistry_alias
.- account_id: str | None = None
AWS account ID that owns the registry being logged into. If not provided, it will be acquired automatically if needed.
- aws_region: str | None = None
AWS region where the registry is located. If not provided, it will be acquired automatically if needed.
- repo_name: str
The name of the repository.
- image: DockerImage | None = None
A
DockerImage
object. This can be retrieved fromhook_data
for a preceding docker.image.build using the hook_data Lookup.If providing a value for this field, do not provide a value for
ecr_repo
orrepo
.
Example¶
pre_deploy:
- path: runway.cfngin.hooks.docker.login
args:
ecr: true
password: ${ecr login-password}
- path: runway.cfngin.hooks.docker.image.build
args:
ecr_repo:
repo_name: ${cfn ${namespace}-test-ecr.Repository}
tags:
- latest
- python3.9
- path: runway.cfngin.hooks.docker.image.push
args:
image: ${hook_data docker.image}
stacks:
ecr-lambda-function:
class_path: blueprints.EcrFunction
variables:
ImageUri: ${hook_data docker.image.uri.latest}