构建运行时
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
构建运行时是指应用的构建环境。
|
Buildpack 构建 |
Docker 构建 |
系统库 |
由堆栈提供 |
用户提供 |
网络访问 |
通过 Envoy Sidecar 的完全访问权限 |
通过 Envoy Sidecar 的完全访问权限 |
文件系统 |
无存储 |
无存储 |
语言运行时 |
由堆栈提供 |
用户提供 |
用户 |
由堆栈指定 |
用户提供 |
隔离机制 |
Kubernetes Pod |
Kubernetes Pod |
DNS |
由 Kubernetes 提供 |
由 Kubernetes 提供 |
环境变量
环境变量会在运行时注入到构建中。变量按以下顺序添加,其中后续值会替换名称相同的较早值:
- 空间(由管理员设置)
- 应用(由开发者设置)
- 系统(由 Kf 设置)
Kf 向构建提供以下系统环境变量:
变量 |
目的 |
CF_INSTANCE_ADDR |
构建的集群可见 IP:PORT。 |
INSTANCE_GUID |
CF_INSTANCE_GUID 的别名。 |
CF_INSTANCE_IP |
构建的集群可见 IP。 |
CF_INSTANCE_INTERNAL_IP |
CF_INSTANCE_IP 的别名 |
VCAP_APP_HOST |
CF_INSTANCE_IP 的别名 |
CF_INSTANCE_PORT |
构建的集群可见端口。 |
LANG |
Buildpacks 需要,以确保脚本加载顺序一致。 |
MEMORY_LIMIT |
构建可以消耗的内存量上限(以 MB 为单位)。 |
VCAP_APPLICATION |
包含应用元数据的 JSON 结构。 |
VCAP_SERVICES |
用于指定绑定服务的 JSON 结构。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-12-11。
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]