We have a number of "in_container" scripts written in Bash, They are doing a number of houseekeeping stuff but since we already have Python 3.7+ inside the CI image, we could modularise them more and make them run from external and simplify entrypoint_ci (for example separate script for tests).
python_build_args: dict[str, str], chicken_egg_providers: str, airflow_version: str
):
    if chicken_egg_providers and is_pre_release(airflow_version):
        get_console().print(
            f"[info]Adding chicken egg providers to build args as {airflow_version} is "
            f"pre release and we have chicken-egg packages '{chicken_egg_providers}' defined[/]"
        )
        python_build_args["INSTALL_PACKAGES_FROM_CONTEXT"] = "true"
        python_build_args["DOCKER_CONTEXT_FILES"] = "./docker-context-files"
@release_management.command(
    name="clean-old-provider-artifacts",
    help="Cleans the old provider artifacts",
)
@option_directory
@option_verbose
@option_dry_run
def clean_old_provider_artifacts(