1
0
Fork 0

Fix permissions and improve syntax

main
Ambrose Chua 2021-05-15 19:28:43 +08:00
parent 884c0508fc
commit ce4159c7f5
1 changed files with 8 additions and 1 deletions

9
runc-wrapper Normal file → Executable file
View File

@ -4,7 +4,14 @@ RUNC=${RUNC:=runc}
if [ -f config.json ]; then
mv config.json config.old.json
jq -c '.mounts |= . + [{ "destination": "/dev/kvm", "type": "bind", "source": "/dev/kvm", "options": [ "bind", "rw" ] }]' config.old.json > config.json
jq -c '.mounts |= . + [
{
"destination": "/dev/kvm",
"type": "bind",
"source": "/dev/kvm",
"options": [ "bind", "rw" ]
}
]' config.old.json > config.json
fi
exec $RUNC "$@"