$ unshare -h ͍ํ: unshare [options] [...] Run a program with some namespaces unshared from the parent. Φϓγϣϯ: -m, --mount ϚϯτωʔϜεϖʔεͷڞ༗Λղআ͠·͢ -u, --uts UTS ωʔϜεϖʔε (ϗετ໊ͳͲ) ͷڞ༗Λղআ͠·͢ -i, --ipc System V IPC ωʔϜεϖʔεͷڞ༗Λղআ͠·͢ -n, --net ωοτϫʔΫωʔϜεϖʔεͷڞ༗Λղআ͠·͢ -p, --pid PID ωʔϜεϖʔεͷڞ༗Λղআ͠·͢ -U, --user ϢʔβωʔϜεϖʔεͷڞ༗Λղআ͠·͢ -f, --fork fork ͔ͯ͠Β <ϓϩάϥϜ> Λىಈ͠·͢ --mount-proc[=<σΟϨΫτϦ>] proc ϑΝΠϧγεςϜΛ࠷ॳʹϚϯτ͠·͢ (͜Εʹ --mount ͷҙຯΛؚΈ·͢) -r, --map-root-user map current user to root (implies --user) -s, --setgroups allow|deny control the setgroups syscall in user namespaces :(ུ)
$ ls /var/lib/lxcfs/ cgroup proc $ ls /var/lib/lxcfs/proc/ cpuinfo meminfo stat uptime $ ls /var/lib/lxcfs/cgroup/ blkio cpuacct devices hugetlb name=systemd cpu cpuset freezer memory perf_event
$ sudo lxc-clone -o ct01 -n ct02 Created container ct02 as copy of ct01 $ sudo lxc-ls -f NAME STATE IPV4 IPV6 GROUPS AUTOSTART -------------------------------------------- ct01 STOPPED - - - NO ct02 STOPPED - - - NO
2 overlayfs ͰΫϩʔϯ
$ sudo lxc-clone -o ct01 -n ct02 -B overlayfs -s Created container ct02 as snapshot of ct01