github.com/kata-containers/runtime@v0.0.0-20210505125100-04f29832a923/virtcontainers/pkg/oci/utils_test_config.go (about) 1 // Copyright (c) 2017 Intel Corporation 2 // 3 // SPDX-License-Identifier: Apache-2.0 4 // 5 6 package oci 7 8 const minimalConfig = ` 9 { 10 "ociVersion": "1.0.0-rc1-dev", 11 "platform": { 12 "os": "linux", 13 "arch": "amd64" 14 }, 15 "process": { 16 "terminal": true, 17 "user": { 18 "uid": 0, 19 "gid": 0, 20 "additionalGids":[10,29] 21 }, 22 "args": [ 23 "sh" 24 ], 25 "env": [ 26 "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", 27 "TERM=xterm" 28 ], 29 "cwd": "/", 30 "capabilities": [ 31 "CAP_AUDIT_WRITE", 32 "CAP_KILL", 33 "CAP_NET_BIND_SERVICE" 34 ], 35 "rlimits": [ 36 { 37 "type": "RLIMIT_NOFILE", 38 "hard": 1024, 39 "soft": 1024 40 } 41 ], 42 "noNewPrivileges": true 43 }, 44 "root": { 45 "path": "rootfs", 46 "readonly": true 47 }, 48 "hostname": "testHostname", 49 "mounts": [ 50 { 51 "destination": "/proc", 52 "type": "proc", 53 "source": "proc" 54 }, 55 { 56 "destination": "/dev", 57 "type": "tmpfs", 58 "source": "tmpfs", 59 "options": [ 60 "nosuid", 61 "strictatime", 62 "mode=755", 63 "size=65536k" 64 ] 65 }, 66 { 67 "destination": "/dev/pts", 68 "type": "devpts", 69 "source": "devpts", 70 "options": [ 71 "nosuid", 72 "noexec", 73 "newinstance", 74 "ptmxmode=0666", 75 "mode=0620", 76 "gid=5" 77 ] 78 } 79 ], 80 "hooks": {}, 81 "linux": { 82 "devices": [ 83 { 84 "gid": 0, 85 "major": 242, 86 "minor": 0, 87 "path": "/dev/vfio/17", 88 "type": "c", 89 "uid": 0 90 } 91 ], 92 "resources": { 93 "devices": [ 94 { 95 "allow": false, 96 "access": "rwm" 97 } 98 ] 99 }, 100 "namespaces": [ 101 { 102 "type": "pid" 103 }, 104 { 105 "type": "network" 106 }, 107 { 108 "type": "ipc" 109 }, 110 { 111 "type": "uts" 112 }, 113 { 114 "type": "mount" 115 } 116 ], 117 "maskedPaths": [ 118 "/proc/kcore", 119 "/proc/latency_stats", 120 "/proc/timer_list", 121 "/proc/timer_stats", 122 "/proc/sched_debug" 123 ], 124 "readonlyPaths": [ 125 "/proc/asound", 126 "/proc/bus", 127 "/proc/fs", 128 "/proc/irq", 129 "/proc/sys", 130 "/proc/sysrq-trigger" 131 ] 132 } 133 } 134 `