logo
1
1
WeChat Login

envsubst

Replace environment variables in files

Image

tencentcom/envsubst:latest

Usage in Docker

docker run --rm -v $(pwd):$(pwd) -w $(pwd) \
  -e PLUGIN_FILE=example.txt \
  tencentcom/envsubst:latest

Usage in Cloud Native Build

main:
  push:
  - stages:
    - name: Replace environment variables in files, only support variables starting with CNB_
      image: tencentcom/envsubst:latest
      settings:
        # File to be processed
        file: example.txt
main:
  push:
  - stages:
    - name: Replace environment variables in files, support custom environment variables
      image: tencentcom/envsubst:latest
      env:
        ENV_A: value
      script:
        - envsubst < input.txt > output.txt

About

envsubst

240.00 KiB
1 forks1 stars1 branches0 TagREADMEMIT license
Language
Dockerfile57.9%
Shell42.1%