# This is the common container.conf for all containers. # If want set custom settings, you have two choices: # 1. Directly modify this file, which is not recommend, because the # setting will be overriden when new version container.conf released. # 2. Use a custom config file in this conf directory: lxc.custom.conf, # it uses the same grammer as container.conf, and will be merged # with the default container.conf by docklet at runtime. # # The following is an example mounting user html directory # lxc.mount.entry = /public/home/%USERNAME%/public_html %ROOTFS%/root/public_html none bind,rw,create=dir 0 0 # #### include /usr/share/lxc/config/ubuntu.common.conf lxc.include = /usr/share/lxc/config/ubuntu.common.conf ############## DOCKLET CONFIG ############## # Setup 0 tty devices lxc.tty = 0 lxc.rootfs = %ROOTFS% lxc.utsname = %HOSTNAME% lxc.network.type = veth lxc.network.name = eth0 # veth.pair is limited in 16 bytes lxc.network.veth.pair = %VETHPAIR% lxc.network.script.up = Bridge=docklet-br-%UserID% %LXCSCRIPT%/lxc-ifup lxc.network.script.down = Bridge=docklet-br-%UserID% %LXCSCRIPT%/lxc-ifdown lxc.network.ipv4 = %IP% lxc.network.ipv4.gateway = %GATEWAY% lxc.network.flags = up lxc.network.mtu = 1420 lxc.cgroup.pids.max = 2048 lxc.cgroup.memory.limit_in_bytes = %CONTAINER_MEMORY%M #lxc.cgroup.memory.kmem.limit_in_bytes = 512M #lxc.cgroup.memory.soft_limit_in_bytes = 4294967296 #lxc.cgroup.memory.memsw.limit_in_bytes = 8589934592 # lxc.cgroup.cpu.cfs_period_us : period time of cpu, default 100000, means 100ms # lxc.cgroup.cpu.cfs_quota_us : quota time of this process lxc.cgroup.cpu.cfs_quota_us = %CONTAINER_CPU% lxc.cap.drop = sys_admin net_admin mac_admin mac_override sys_time sys_module lxc.mount.entry = %FS_PREFIX%/global/users/%USERNAME%/data %ROOTFS%/root/nfs none bind,rw,create=dir 0 0 lxc.mount.entry = %FS_PREFIX%/global/users/%USERNAME%/hosts/%CLUSTERID%.hosts %ROOTFS%/etc/hosts none bind,ro,create=file 0 0 lxc.mount.entry = %FS_PREFIX%/global/users/%USERNAME%/ssh %ROOTFS%/root/.ssh none bind,ro,create=dir 0 0 lxc.mount.entry = %FS_PREFIX%/local/temp/%LXCNAME%/ %ROOTFS%/tmp none bind,rw,create=dir 0 0 # setting hostname lxc.hook.pre-start = HNAME=%HOSTNAME% %LXCSCRIPT%/lxc-prestart # setting nfs softlink #lxc.hook.mount = %LXCSCRIPT%/lxc-mount