def METHOD_NAME(
    repo_type: str,
    packages_dir: pl.Path,
    output_dir: pl.Path,
):
    """
    Use packages from the given directory and create repository from them using docker build.
    :param repo_type: Typ of the repo, e.g. apt or yum
    :param packages_dir: Directory with packages to add to repo.
    :param output_dir: Path to a resulting directory with repo
    """
    toolset_oci_layout_path = build_toolset_image_oci_layout()
    buildx_build(
        dockerfile_path=_PARENT_DIR / "Dockerfile",
        context_path=_PARENT_DIR,
        architectures=[CpuArch.x86_64],
        build_args={
            "REPO_TYPE": repo_type,
        },
        build_contexts={
            "toolset": f"oci-layout://{toolset_oci_layout_path}",
            "packages": str(packages_dir),
        },
        output=LocalDirectoryBuildOutput(
            dest=output_dir,
        ),
    )