veid=1000
vzctl create $veid –ostemplate centos-7-x86_64 –diskspace 20G
vzctl set $veid –features bridge:on –save
vzctl set $veid –netif_add eth0 –save
vzctl set $veid –netfilter full –save
vzctl set $veid –devnodes net/tun:rw –save
vzctl mount $veid
echo “JoinControllers=cpu,cpuacct,cpuset freezer,devices” >> /vz/root/$veid/etc/systemd/system.conf
vzctl start $veid
mount -t tmpfs tmpfs /sys/fs/cgroup
mkdir /sys/fs/cgroup/freezer,devices
mount -t cgroup cgroup /sys/fs/cgroup/freezer,devices -o freezer,devices
mkdir /sys/fs/cgroup/cpu,cpuacct,cpuset
mount -t cgroup cgroup /sys/fs/cgroup/cpu,cpuacct,cpuset/ -o cpu,cpuacct,cpuset
Install docker:
yum -y install docker-io
docker -d -s vfs