2017-02-10 01:04:29 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
cat <<EOF
|
|
|
|
{
|
|
|
|
"ociVersion": "1.0.0-rc1",
|
|
|
|
"platform": {
|
|
|
|
"os": "linux",
|
|
|
|
"arch": "$ARCH"
|
|
|
|
},
|
|
|
|
"process": {
|
2017-03-01 00:39:11 +01:00
|
|
|
"args": ["sh"],
|
|
|
|
"terminal": false,
|
|
|
|
"tty": false,
|
2017-02-10 01:04:29 +01:00
|
|
|
"user": {
|
|
|
|
"uid": $CONTAINER_UID,
|
|
|
|
"gid": $CONTAINER_GID
|
|
|
|
},
|
|
|
|
"env": [
|
|
|
|
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
|
|
|
"TERM=xterm"
|
|
|
|
],
|
|
|
|
"cwd": "/",
|
|
|
|
"capabilities": [
|
|
|
|
"CAP_AUDIT_WRITE",
|
|
|
|
"CAP_KILL",
|
|
|
|
"CAP_NET_BIND_SERVICE"
|
|
|
|
],
|
|
|
|
"rlimits": [
|
|
|
|
{
|
|
|
|
"type": "RLIMIT_NOFILE",
|
|
|
|
"hard": 1024,
|
|
|
|
"soft": 1024
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"noNewPrivileges": true
|
|
|
|
},
|
|
|
|
"root": {
|
2017-03-01 00:39:11 +01:00
|
|
|
"path": "$FULL_CONTAINER_PATH",
|
|
|
|
"readonly": true
|
2017-02-10 01:04:29 +01:00
|
|
|
},
|
|
|
|
"mounts": [
|
|
|
|
{
|
|
|
|
"type": "bind",
|
2017-03-01 00:39:11 +01:00
|
|
|
"source": "$FULL_DATA_PATH",
|
2017-02-10 01:04:29 +01:00
|
|
|
"destination": "/data",
|
|
|
|
"options": [ "rbind", "rw", "noexec" ]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"destination": "/proc",
|
|
|
|
"type": "proc",
|
|
|
|
"source": "proc"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"destination": "/dev",
|
|
|
|
"type": "tmpfs",
|
|
|
|
"source": "tmpfs",
|
|
|
|
"options": [
|
|
|
|
"nosuid",
|
|
|
|
"strictatime",
|
|
|
|
"mode=755",
|
|
|
|
"size=65536k"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"destination": "/dev/pts",
|
|
|
|
"type": "devpts",
|
|
|
|
"source": "devpts",
|
|
|
|
"options": [
|
|
|
|
"nosuid",
|
|
|
|
"noexec",
|
|
|
|
"newinstance",
|
|
|
|
"ptmxmode=0666",
|
|
|
|
"mode=0620",
|
|
|
|
"gid=5"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"destination": "/dev/shm",
|
|
|
|
"type": "tmpfs",
|
|
|
|
"source": "shm",
|
|
|
|
"options": [
|
|
|
|
"nosuid",
|
|
|
|
"noexec",
|
|
|
|
"nodev",
|
|
|
|
"mode=1777",
|
|
|
|
"size=65536k"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"destination": "/dev/mqueue",
|
|
|
|
"type": "mqueue",
|
|
|
|
"source": "mqueue",
|
|
|
|
"options": [
|
|
|
|
"nosuid",
|
|
|
|
"noexec",
|
|
|
|
"nodev"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"destination": "/sys",
|
|
|
|
"type": "sysfs",
|
|
|
|
"source": "sysfs",
|
|
|
|
"options": [
|
|
|
|
"nosuid",
|
|
|
|
"noexec",
|
|
|
|
"nodev",
|
|
|
|
"ro"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"destination": "/sys/fs/cgroup",
|
|
|
|
"type": "cgroup",
|
|
|
|
"source": "cgroup",
|
|
|
|
"options": [
|
|
|
|
"nosuid",
|
|
|
|
"noexec",
|
|
|
|
"nodev",
|
|
|
|
"relatime",
|
|
|
|
"ro"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"hooks": {},
|
|
|
|
"linux": {
|
|
|
|
"resources": {
|
|
|
|
"devices": [
|
|
|
|
{
|
|
|
|
"allow": false,
|
|
|
|
"access": "rwm"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"namespaces": [
|
|
|
|
{
|
|
|
|
"type": "pid"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "ipc"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "mount"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"maskedPaths": [
|
|
|
|
"/proc/kcore",
|
|
|
|
"/proc/latency_stats",
|
|
|
|
"/proc/timer_stats",
|
|
|
|
"/proc/sched_debug"
|
|
|
|
],
|
|
|
|
"readonlyPaths": [
|
|
|
|
"/proc/asound",
|
|
|
|
"/proc/bus",
|
|
|
|
"/proc/fs",
|
|
|
|
"/proc/irq",
|
|
|
|
"/proc/sys",
|
|
|
|
"/proc/sysrq-trigger"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"solaris": {
|
|
|
|
"cappedCPU": {},
|
|
|
|
"cappedMemory": {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
EOF
|