离线工作流程


很多生产环境没有网络访问权限。 由于 Corepack 通常直接从其仓库下载包管理器版本,它可能与此类环境发生冲突。 为避免这种情况发生,请在您仍有网络访问权限时调用 corepack prepare 命令(通常在您准备部署映像的同时)。 这将确保即使没有网络访问,所需的包管理器也可用。

prepare 命令有各种标志,有关此事的更多信息,请参阅详细的 Corepack 文档

Many production environments don't have network access. Since Corepack usually downloads the package manager releases straight from their registries, it can conflict with such environments. To avoid that happening, call the corepack prepare command while you still have network access (typically at the same time you're preparing your deploy image). This will ensure that the required package managers are available even without network access.

The prepare command has various flags, consult the detailed Corepack documentation for more information on the matter.