6,534
edits
Changes
add prereq
Since OpenVZ kernel 042stab105.4 it is possible to run Docker inside containers. This article describes how.
== Prerequisites ==
* Kernel 042stab105.4 or later version
* Kernel module veth module is loaded on host
== Container tuning ==
* 1. Make sure veth kernel module is loaded on the host* 2. Create Fedora 20 container:
vzctl create $veid --ostemplate fedora-20-x86_64
* 32. Turn on bridge feature to allow docker creating bridged network:
vzctl set $veid --features bridge:on --save
* 43. Setup Container veth-based network:
vzctl set $veid --netif_add eth0 --save
* 54. Allow all iptables modules being used in containers:
vzctl set $veid --netfilter full --save
* 65. Configure custom cgroups in systemd:
vzctl mount $veid
echo "JoinControllers=cpu,cpuacct,cpuset,freezer,devices" >> /vz/root/$veid/etc/systemd/system.conf
* 76. Start the container:
vzctl start $veid