github.com/alibaba/sealer@v0.8.6-0.20220430115802-37a2bdaa8173/pkg/env/README.md (about)

     1  # ENV module
     2  
     3  This module will merge the host env and global env, then render env into cloudrootfs templates or set env when exec a shell command and script.
     4  
     5  ## ENV template render
     6  
     7  ENV module only render the filename has ".tmpl" suffix, and render the result into a new file.
     8  
     9  Like: test.yaml.tmpl -> test.yaml
    10  
    11  test.yaml.tmpl:
    12  
    13  ```shell script
    14  {{ .foo }}
    15  ```
    16  
    17  render result, test.yaml:
    18  
    19  ```shell script
    20  bar
    21  ```
    22  
    23  ## Shell ENV
    24  
    25  Add ENV value to each shell command.
    26  
    27  Raw shell command:
    28  
    29  ```shell script
    30  cat /etc/hosts
    31  ```
    32  
    33  WrapperShell:
    34  
    35  ```shell script
    36  foo=bar cat /etc/hosts
    37  ```