Zadig 文档
Zadig
教程
博客
论坛
关于
中文英文
Zadig
教程
博客
论坛
关于
Zadig v4.2
Loading...
     编辑文档
     反馈问题
     社区讨论

    本页导航

    Build Templates

    Background

    Extract the build configuration of the service into a template. When creating a service, you can choose to create it based on the template. This is suitable for scenarios where the build configuration is the same for a large number of services.

    # New Template

    Go to Assets → Templates → Build to enter the build template management page. Click the + button, enter the template name, and refer to Build Configuration to complete the configuration of the build template.

    The Code Information section in the template does not need to be configured. It can be configured when creating a build for a service using the build template.

    Building templates

    Tips

    Combining the use of build variables $REPONAME_<index> can cleverly complete the configuration of the build template. For example, if the service's source code and compilation configuration are in repository A and the Dockerfile is in repository B, the scripts in the build configuration can be organized as follows:

    #!/bin/bash
    set -ex
    
    cd $WORKSPACE/$REPONAME_0/service/
    cp $WORKSPACE/$REPONAME_1/dockerfiles/$SERVICE.Dockerfile .
    make build
    docker build -t $IMAGE -f $SERVICE.Dockerfile .
    docker push $IMAGE
    
    1
    2
    3
    4
    5
    6
    7
    8

    When creating a build using a build template, simply follow the steps to configure the corresponding code repository.

    # Using Templates

    Refer to Using Build Templates.

    ← Dockerfile TemplateCode Scanning Template→

    资源
    教程
    论坛
    博客
    公司
    关于
    客户故事
    加入我们
    联系我们
    微信扫一扫
    hello@koderover.com

    © 2026 筑栈(上海)信息技术有限公司 沪 ICP 备 19000177 号 - 1

    •  跟随系统
    •  浅色模式
    •  深色模式
    •  阅读模式