This commit mainly accomplish two things: 1. Use makefile to manage dependencies for `occlum build`, which can save lots of time 2. Take dirs `build`, `run` outside from `.occlum`. Remove env var "OCCLUM_INSTANCE_DIR"
56 lines
1.5 KiB
Bash
Executable File
56 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
OCCLUM_INSTANCE_DIR="."
|
|
|
|
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": "sefs",
|
|
"source": "$OCCLUM_INSTANCE_DIR/run/mount/tmp",
|
|
"options": {
|
|
"temporary": true
|
|
}
|
|
}
|
|
],
|
|
"env": $OCCLUM_CONF_ENV,
|
|
"entry_points": $OCCLUM_CONF_ENTRY_POINTS
|
|
}
|
|
EOF
|