HEADS-project / training

Training material to get started with the HEADS technologies
10 stars 16 forks source link

How to make a kevoreejs docker with initial kevscript #113

Closed kehusa closed 7 years ago

kehusa commented 8 years ago

Trying to make a docker image with an initial main.kevs. What is the best approach? Tried by using kevoree/js image but where to store the main.kevs?

maxleiko commented 8 years ago

With the image kevoree/js you can pass along command-line parameters just like you would do with the Node.js runtime. Something like:

docker run --rm -it kevoree/js -n node0

Should work (you might have to add .kevs or .json with a volume when using -m or -k)

docker run --rm -v /tmp/models:/path/to -it kevoree/js -n node0 -k /path/to/model.kevs

kehusa commented 8 years ago

The thing is that I would like to instantiate a lot of these dockers (simulation). Is it possible to download the kevscript via http like:

docker run --rm -it kevoree/js -n node0 -k http://server/path/to/model.kevs

2016-06-28 9:41 GMT+02:00 Maxime Tricoire notifications@github.com:

With the image kevoree/js you can pass along command-line parameters just like you would do with the Node.js runtime. Something like:

docker run --rm -it kevoree/js -n node0

Should work (you might have to add .kevs or .json with a volume when using -m or -k)

docker run --rm -v /tmp/models:/path/to -it kevoree/js -n node0 -k /path/to/model.kevs

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/HEADS-project/training/issues/113#issuecomment-228975223, or mute the thread https://github.com/notifications/unsubscribe/AIN55yJx6KsZG8ldiYB7SJDEYVBV0IMdks5qQNAVgaJpZM4I_dzO .

| Knut Eilif Husa | Tellu AS | Lensmannslia 4, 1386 Asker - NORWAY| Direct: +47 452 49496 | www.tellu.no |

This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.

maxleiko commented 8 years ago

You could create a tiny bash script to handle this use-case.

wget http://server/path/to/model.kevs -O /tmp/kevs/model.kevs
docker run --rm -it -v /tmp/kevs:/kevoree kevoree/js -n node0 -k /kevoree/model/kevs

That should do the trick