From ebd8d5b1fd55c7bfa359f80b58e56cdda3644723 Mon Sep 17 00:00:00 2001 From: ms Date: Thu, 12 May 2022 08:45:24 +0200 Subject: read file from host --- typescript/README | 7 +++++-- typescript/container/taler-config.js | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/typescript/README b/typescript/README index c683c7c..f0a9445 100644 --- a/typescript/README +++ b/typescript/README @@ -4,6 +4,9 @@ Building and running the image. $ podman build -t $tag . After the build, run: -$ podman run -it $tag +$ podman run [-it] [-v /host/path/to/config-file:/config.ts] $tag -If no errors occur, login as 'root' (p: 'taler'). +The "[-it]" part makes it interactive, although it won't +be possible to kill the container only with CTRL-C. If "-v" +is given, the contained application will read 'config-file' +and configure/launch Taler according to it. diff --git a/typescript/container/taler-config.js b/typescript/container/taler-config.js index 44cda4d..4d01bf8 100755 --- a/typescript/container/taler-config.js +++ b/typescript/container/taler-config.js @@ -1,10 +1,10 @@ #!/usr/bin/nodejs -/*try { +var fs = require("fs") + +try { const data = fs.readFileSync("/config.ts", "utf-8"); + console.log(data); } catch (error) { console.log(error); } -console.log(data)*/ - -console.log("I'm startled.") -- cgit v1.2.3