ecs_composex.compose.compose_services.service_image package ¶
Submodules ¶
ecs_composex.compose.compose_services.service_image.docker_opts module ¶
Helper functions around ECR and docker images, done early to ensure viability of the execution before doing all the resources allocations / lookups
ecs_composex.compose.compose_services.service_image.ecr_helpers module ¶
- ecs_composex.compose.compose_services.service_image.ecr_helpers. define_ecr_session ( account_id , repo_name , region , settings , role_arn = None ) [source] ¶
-
Function to determine the boto3 session to use for subsequent API calls to ECR :type account_id: :param account_id: :type repo_name: :param repo_name: :type region: :param region: :type settings: :param settings: :param str role_arn: :return:
- ecs_composex.compose.compose_services.service_image.ecr_helpers. define_service_image ( service , settings ) [source] ¶
-
Function to parse and identify the image for the service in AWS ECR
- Parameters :
-
-
service ( ecs_composex.common.compose_services.ComposeService ) –
-
settings ( ecs_composex.common.settings.ComposeXSettings ) – The settings for the execution
-
- Returns :
-
- ecs_composex.compose.compose_services.service_image.ecr_helpers. identify_service_image ( service , repo_name , image_sha , image_tag , session ) [source] ¶
-
Function to identify the image in repository that matches the one defined in service for a private ECR Based image.
- Parameters :
-
-
repo_name ( str ) –
-
image_sha ( str ) –
-
image_tag ( str ) –
-
session ( boto3.session.Session ) –
-
- Returns :
-
The image definition
- Return type :
-
dict
ecs_composex.compose.compose_services.service_image.ecr_scans_eval module ¶
Module contents ¶
- class ecs_composex.compose.compose_services.service_image. ServiceImage ( service , image_param = None ) [source] ¶
-
Bases:
object
- Variables :
-
-
_image –
-
image_uri ( str ) –
-
- property image : Union [ str , Ref ] ¶
- interpolate_image_digest ( settings = None ) [source] ¶
-
if service x-ecr is set, and image URI indicates a resolvable image, sets image_digest
- property private_ecr : Optional [ Match ] ¶
- property public_ecr : Optional [ Match ] ¶
- retrieve_image_digest ( ) [source] ¶
-
Retrieves the docker images digest from the repository to use instead of the image tag.
- property service : ComposeService ¶