aws_ecr_helpers#

This module implements the automation to build and push container image for ECR.

aws_ops_alpha.aws_helpers.aws_ecr_helpers.ecr_login(bsm_devops: BotoSesManager)[source]#

Login to ECR.

Parameters:

bsm_devops – the devops AWS Account BotoSesManager object.

aws_ops_alpha.aws_helpers.aws_ecr_helpers.build_image(bsm_devops: BotoSesManager, pyproject_ops: pyops.PyProjectOps, repo_name: str, path_dockerfile: Path, use_arm: bool = False)[source]#

Build container image using docker build command.

Parameters:
  • bsm_devops – the devops AWS Account BotoSesManager object.

  • pyproject_opsPyProjectOps object.

  • repo_name – ECR repository name.

  • path_dockerfile – Path to the Dockerfile.

  • use_arm – is True, then build for ARM architecture, otherwise build for x86_64.

aws_ops_alpha.aws_helpers.aws_ecr_helpers.push_image(bsm_devops: BotoSesManager, pyproject_ops: pyops.PyProjectOps, repo_name: str, path_dockerfile: Path)[source]#

Push built container image from local to ECR using docker build command.

Parameters:
  • bsm_devops – the devops AWS Account BotoSesManager object.

  • pyproject_opsPyProjectOps object.

  • repo_name – ECR repository name.

  • path_dockerfile – Path to the Dockerfile.