default_template.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package namespaces
  2. import (
  3. "github.com/dotcloud/docker/pkg/cgroups"
  4. "github.com/dotcloud/docker/pkg/libcontainer"
  5. )
  6. // getDefaultTemplate returns the docker default for
  7. // the libcontainer configuration file
  8. func getDefaultTemplate() *libcontainer.Container {
  9. return &libcontainer.Container{
  10. Capabilities: libcontainer.Capabilities{
  11. libcontainer.CAP_SETPCAP,
  12. libcontainer.CAP_SYS_MODULE,
  13. libcontainer.CAP_SYS_RAWIO,
  14. libcontainer.CAP_SYS_PACCT,
  15. libcontainer.CAP_SYS_ADMIN,
  16. libcontainer.CAP_SYS_NICE,
  17. libcontainer.CAP_SYS_RESOURCE,
  18. libcontainer.CAP_SYS_TIME,
  19. libcontainer.CAP_SYS_TTY_CONFIG,
  20. libcontainer.CAP_MKNOD,
  21. libcontainer.CAP_AUDIT_WRITE,
  22. libcontainer.CAP_AUDIT_CONTROL,
  23. libcontainer.CAP_MAC_ADMIN,
  24. libcontainer.CAP_MAC_OVERRIDE,
  25. libcontainer.CAP_NET_ADMIN,
  26. },
  27. Namespaces: libcontainer.Namespaces{
  28. libcontainer.CLONE_NEWIPC,
  29. libcontainer.CLONE_NEWNET,
  30. libcontainer.CLONE_NEWNS,
  31. libcontainer.CLONE_NEWPID,
  32. libcontainer.CLONE_NEWUTS,
  33. },
  34. Cgroups: &cgroups.Cgroup{
  35. Parent: "docker",
  36. DeviceAccess: false,
  37. },
  38. }
  39. }