Closed Lockszmith-GH closed 1 week ago
Try it like this:
jlmkr create --start --config=<( curl -sL https://raw.githubusercontent.com/Jip-Hop/jailmaker/develop/templates/nixos/config) nixos
Yes, I thought of that, this will work if I'm in a root login (yes, yes, I know - I should be in it already), but if runing via sudo, the file-descriptor does not pass across the different contexts. The pipeline does not have this limitation.
$ sudo jlmkr create --start --config <(cat $SCALE_POOL_ROOT/jailmaker/templates/nixos/config) nixostest
USE THIS SCRIPT AT YOUR OWN RISK!
IT COMES WITHOUT WARRANTY AND IS NOT SUPPORTED BY IXSYSTEMS.
Creating jail nixostest from config template /dev/fd/63.
Failed to read config template /dev/fd/63.
Yes, I see. PR is welcome if you feel like implementing this! 😉 The config file handling needs a bugfix too.
I'll take a look later today, felx my Python a bit :)
This should now work with jlmkr on the develop branch.
curl -sL https://raw.githubusercontent.com/Jip-Hop/jailmaker/develop/templates/docker/config | jlmkr create --start --config - docker
Please test and provide feedback.
I did, and I love it
is such a great feature, I would recommend exapding it to allow input form stdin, which would allow something like:
or even:
The common convetion in linux is to read from stdin when a dash (
-
) is passed a file name, so following that seems like a safe option.