File tree Expand file tree Collapse file tree 5 files changed +171
-0
lines changed Expand file tree Collapse file tree 5 files changed +171
-0
lines changed Original file line number Diff line number Diff line change @@ -244,4 +244,175 @@ Annotations are key-value maps.
244244}
245245```
246246
247+ ## Configuration Schema Example
248+
249+ Here is a full example ` config.json ` for reference.
250+
251+ ``` json
252+ {
253+ "ociVersion" : " 0.3.0" ,
254+ "platform" : {
255+ "os" : " linux" ,
256+ "arch" : " amd64"
257+ },
258+ "process" : {
259+ "terminal" : true ,
260+ "user" : {
261+ "uid" : 1 ,
262+ "gid" : 1 ,
263+ "additionalGids" : [
264+ 5 ,
265+ 6
266+ ]
267+ },
268+ "args" : [
269+ " sh"
270+ ],
271+ "env" : [
272+ " PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ,
273+ " TERM=xterm"
274+ ],
275+ "cwd" : " /" ,
276+ "capabilities" : [
277+ " CAP_AUDIT_WRITE" ,
278+ " CAP_KILL" ,
279+ " CAP_NET_BIND_SERVICE"
280+ ],
281+ "apparmorProfile" : " " ,
282+ "selinuxLabel" : " "
283+ },
284+ "root" : {
285+ "path" : " rootfs" ,
286+ "readonly" : true
287+ },
288+ "hostname" : " slartibartfast" ,
289+ "mounts" : [
290+ {
291+ "destination" : " /proc" ,
292+ "type" : " proc" ,
293+ "source" : " proc"
294+ },
295+ {
296+ "destination" : " /dev" ,
297+ "type" : " tmpfs" ,
298+ "source" : " tmpfs" ,
299+ "options" : [
300+ " nosuid" ,
301+ " strictatime" ,
302+ " mode=755" ,
303+ " size=65536k"
304+ ]
305+ },
306+ {
307+ "destination" : " /dev/pts" ,
308+ "type" : " devpts" ,
309+ "source" : " devpts" ,
310+ "options" : [
311+ " nosuid" ,
312+ " noexec" ,
313+ " newinstance" ,
314+ " ptmxmode=0666" ,
315+ " mode=0620" ,
316+ " gid=5"
317+ ]
318+ },
319+ {
320+ "destination" : " /dev/shm" ,
321+ "type" : " tmpfs" ,
322+ "source" : " shm" ,
323+ "options" : [
324+ " nosuid" ,
325+ " noexec" ,
326+ " nodev" ,
327+ " mode=1777" ,
328+ " size=65536k"
329+ ]
330+ },
331+ {
332+ "destination" : " /dev/mqueue" ,
333+ "type" : " mqueue" ,
334+ "source" : " mqueue" ,
335+ "options" : [
336+ " nosuid" ,
337+ " noexec" ,
338+ " nodev"
339+ ]
340+ },
341+ {
342+ "destination" : " /sys" ,
343+ "type" : " sysfs" ,
344+ "source" : " sysfs" ,
345+ "options" : [
346+ " nosuid" ,
347+ " noexec" ,
348+ " nodev"
349+ ]
350+ },
351+ {
352+ "destination" : " /sys/fs/cgroup" ,
353+ "type" : " cgroup" ,
354+ "source" : " cgroup" ,
355+ "options" : [
356+ " nosuid" ,
357+ " noexec" ,
358+ " nodev" ,
359+ " relatime" ,
360+ " ro"
361+ ]
362+ }
363+ ],
364+ "hooks" : {
365+ "prestart" : [
366+ {
367+ "path" : " /usr/bin/uptime" ,
368+ "args" : [
369+ " /usr/bin/uptime"
370+ ],
371+ "env" : []
372+ }
373+ ]
374+ },
375+ "linux" : {
376+ "rlimits" : [
377+ {
378+ "type" : " RLIMIT_NOFILE" ,
379+ "hard" : 1024 ,
380+ "soft" : 1024
381+ }
382+ ],
383+ "resources" : {
384+ "devices" : [
385+ {
386+ "allow" : false ,
387+ "access" : " rwm"
388+ }
389+ ]
390+ },
391+ "namespaces" : [
392+ {
393+ "type" : " pid"
394+ },
395+ {
396+ "type" : " network"
397+ },
398+ {
399+ "type" : " ipc"
400+ },
401+ {
402+ "type" : " uts"
403+ },
404+ {
405+ "type" : " mount"
406+ }
407+ ],
408+ "devices" : null ,
409+ "seccomp" : {
410+ "defaultAction" : " " ,
411+ "architectures" : null
412+ }
413+ }
414+ }
415+ ```
416+
417+
247418[ uts-namespace ] : http://man7.org/linux/man-pages/man7/namespaces.7.html
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments