occlum/tools/occlum-gen-default-occlum-json
2020-07-23 21:40:34 +08:00

54 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
if [ -z $OCCLUM_INSTANCE_DIR ];then
OCCLUM_INSTANCE_DIR=".occlum"
fi
cat <<EOF
{
"resource_limits": {
"user_space_size": "$OCCLUM_CONF_USER_SPACE_SIZE"
},
"process": {
"default_stack_size": "$OCCLUM_CONF_DEFAULT_STACK_SIZE",
"default_heap_size": "$OCCLUM_CONF_DEFAULT_HEAP_SIZE",
"default_mmap_size": "$OCCLUM_CONF_DEFAULT_MMAP_SIZE"
},
"mount": [
{
"target": "/",
"type": "unionfs",
"options": {
"layers": [
{
"target": "/",
"type": "sefs",
"source": "$OCCLUM_INSTANCE_DIR/build/mount/__ROOT",
"options": {
"integrity_only": true,
"MAC": "$OCCLUM_CONF_ROOT_FS_MAC"
}
},
{
"target": "/",
"type": "sefs",
"source": "$OCCLUM_INSTANCE_DIR/run/mount/__ROOT"
}
]
}
},
{
"target": "/host",
"type": "hostfs",
"source": "."
},
{
"target": "/tmp",
"type": "ramfs"
}
],
"env": $OCCLUM_CONF_ENV,
"entry_points": $OCCLUM_CONF_ENTRY_POINTS
}
EOF