The default instance dir of Occlum is ".occlum". User now can specify the name by declaring environment variable "OCCLUM_INSTANCE_DIR"
46 lines
1.1 KiB
Bash
Executable File
46 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ -z $OCCLUM_INSTANCE_DIR ];then
|
|
OCCLUM_INSTANCE_DIR=".occlum"
|
|
fi
|
|
|
|
cat <<EOF
|
|
{
|
|
"vm": {
|
|
"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": "sefs",
|
|
"source": "$OCCLUM_INSTANCE_DIR/build/mount/__ROOT",
|
|
"options": {
|
|
"integrity_only": true,
|
|
"MAC": "$OCCLUM_CONF_ROOT_FS_MAC"
|
|
}
|
|
},
|
|
{
|
|
"target": "/root",
|
|
"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
|