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).
clean_www_assets()
    get_console().print("[info]Compiling assets in docker container\n")
    result = run_command(
        [
            "docker",
            "run",
            "-t",
            "-v",
            f"{AIRFLOW_WWW_DIR}:/opt/airflow/airflow/www/",
            "-e",
            "FORCE_COLOR=true",
            NODE_BUILD_IMAGE_TAG,
            "bash",
            "-c",
            "cd /opt/airflow/airflow/www && yarn install --frozen-lockfile && yarn run build",
        ],
        text=True,