"--bind", context.cache_dir / "lib/apt", context.cache_dir / "lib/apt",
"--bind", context.cache_dir / "cache/apt", context.cache_dir / "cache/apt",
"--ro-bind", context.workspace / "apt.conf", context.workspace / "apt.conf",
+ *(["--ro-bind", m, m] if (m := context.config.local_mirror) else []),
*finalize_crypto_mounts(tools=context.config.tools()),
*finalize_source_mounts(context.config),
*mounts,
"--bind",
context.cache_dir / "lib" / dnf_subdir(context),
context.cache_dir / "lib" / dnf_subdir(context),
+ *(["--ro-bind", m, m] if (m := context.config.local_mirror) else []),
*finalize_crypto_mounts(tools=context.config.tools()),
*finalize_source_mounts(context.config),
"--chdir", "/work/src",
options=[
"--bind", context.root, context.root,
"--bind", context.cache_dir / "cache/pacman/pkg", context.cache_dir / "cache/pacman/pkg",
+ *(["--ro-bind", m, m] if (m := context.config.local_mirror) else []),
*finalize_crypto_mounts(tools=context.config.tools()),
*finalize_source_mounts(context.config),
"--chdir", "/work/src",
options=[
"--bind", context.root, context.root,
"--bind", context.cache_dir / "cache/zypp", context.cache_dir / "cache/zypp",
+ *(["--ro-bind", m, m] if (m := context.config.local_mirror) else []),
*finalize_crypto_mounts(tools=context.config.tools()),
*finalize_source_mounts(context.config),
"--chdir", "/work/src",