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).
#
#
"""Various utils to prepare docker and docker compose commands."""
from __future__ import annotations
import copy
import json
import os
import re
import sys
from subprocess import DEVNULL, CalledProcessError, CompletedProcess
from typing import TYPE_CHECKING
from airflow_breeze.params.build_prod_params import BuildProdParams
from airflow_breeze.utils.cache import read_from_cache_file
from airflow_breeze.utils.host_info_utils import get_host_group_id, get_host_os, get_host_user_id
from airflow_breeze.utils.path_utils import (
    AIRFLOW_SOURCES_ROOT,
    cleanup_python_generated_files,
    create_mypy_volume_if_needed,