libera_utils.aws.ecr_upload.get_ecr_docker_client#
- libera_utils.aws.ecr_upload.get_ecr_docker_client(region_name: str | None = None, dockercfg_path: Path | None = None) DockerClient #
Perform programmatic docker login to the default ECR for the current AWS credential account (e.g. AWS_PROFILE) and return a DockerClient object for interacting with the ECR.
- Parameters:
region_name (Optional[str]) – AWS region name. Each region has a separate default ECR. If region_name is None, boto3 uses the default region for the configured credentials.
dockercfg_path (Optional[Path]) – Use a custom path for the Docker config file. (default $HOME/.docker/config.json if present, otherwise $HOME/.dockercfg)
- Returns:
Logged in docker client.
- Return type:
docker.DockerClient