From 2700441a2357ef76d4ffd9b1f9cc74eab3551abd Mon Sep 17 00:00:00 2001 From: Yuriy Bogdanov Date: Sat, 19 Sep 2015 08:10:32 +0300 Subject: [PATCH] #13 readme --- src/rocker/template/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/rocker/template/README.md b/src/rocker/template/README.md index b53a2cbe..15cd8caa 100644 --- a/src/rocker/template/README.md +++ b/src/rocker/template/README.md @@ -99,6 +99,26 @@ Example: HOME={{ .Env.HOME }} ``` +# Load file content to a variable +This template engine also supports loading files content to a variables. `rocker` and `rocker-compose` support this through a command line parameters: + +```bash +rocker build -var key=@key.pem +rocker-compose run -var key=@key.pem +``` + +If the file path is relative, it will be resolved according to the current working directory. + +**Usage options:** + +``` +key=@relative/file/path.txt +key=@../another/relative/file/path.txt +key=@/absolute/file/path.txt +key=@~/.bash_history +key=\@keep_value_as_is +``` + # Development Please install pre-push git hook that will run tests before every push: