58 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
		
			1.5 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": "sefs",
 | |
|             "source": "$OCCLUM_INSTANCE_DIR/run/mount/tmp",
 | |
|             "options": {
 | |
|                 "temporary": true
 | |
|             }
 | |
|         }
 | |
|     ],
 | |
|     "env": $OCCLUM_CONF_ENV,
 | |
|     "entry_points": $OCCLUM_CONF_ENTRY_POINTS
 | |
| }
 | |
| EOF
 |