def METHOD_NAME(
    builds_path,
    repo_tests_path,
    result_path,
    server_log_path,
    kill_timeout,
    additional_envs,
    image,
):
    envs = [
        f"-e MAX_RUN_TIME={int(0.9 * kill_timeout)}",
    ]
    envs += [f"-e {e}" for e in additional_envs]
    env_str = " ".join(envs)
    return (
        f"docker run "
        f"--volume={builds_path}:/package_folder "
        f"--volume={repo_tests_path}:/clickhouse-tests "
        f"--volume={result_path}:/test_output "
        f"--volume={server_log_path}:/var/log/clickhouse-server "
        f"--cap-add=SYS_PTRACE {env_str} {image}"
    )