This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.5.2.3.2. 使用 Source-to-image 构建配置环境
您可以在构建配置的 sourceStrategy
定义中添加环境变量。这里定义的环境变量可在 assemble
脚本执行期间看到,也会在输出镜像中定义,使它们能够供 run
脚本和应用程序代码使用。
流程
例如,禁用 Rails 应用程序的资产编译:
sourceStrategy: ... env: - name: "DISABLE_ASSET_COMPILATION" value: "true"
sourceStrategy: ... env: - name: "DISABLE_ASSET_COMPILATION" value: "true"
Copy to Clipboard Copied!