Google Cloud 的 Buildpack 是一个开源项目,可获取应用源代码并将其转换为可用于生产用途的容器映像。 Google Cloud 发布的 Buildpack 实现了云原生 Buildpack 规范,旨在帮助您构建和配置可部署到 Google Cloud的容器。
Buildpack 通常负责语言组件、工具链或应用组件,例如 Python、pip 或 Web 服务器。Buildpack 分组为名为构建器的集合,这些集合可以分析项目源代码、创建构建计划,以及生成可进行部署的容器映像。
使用 Buildpack 进行容器化
当您在 Google Cloud 无服务器产品中部署应用(服务)或函数时,代码会使用 Buildpack 打包到可运行的容器中。在 Cloud Run 上,您可以选择部署预构建容器或部署源代码,让 Cloud Run 管理容器构建。在 Cloud Run functions 和 App Engine 上,容器化过程是完全托管的,这意味着当您部署源代码时,系统会为您完成所有容器映像打包和转换工作。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-03-26。"],[[["Google Cloud's buildpacks are an open-source project that transforms application source code into production-ready container images, based on the Cloud Native Buildpack specification."],["Buildpacks are responsible for language components or tools, and are grouped into builders that analyze code and generate deployable container images."],["Google Cloud Serverless products use buildpacks to package code into runnable containers, and the process is fully managed on Cloud Run functions and App Engine."],["Builders and buildpacks are pre-configured to handle the build process and automatically detect the programming language, supporting multiple languages."],["Buildpacks can be used to build both applications/services and functions, and a `Procfile` can define the startup process for containers, being mandatory for some languages like Python."]]],[]]