I didn't know much about LXC so did some quick reading. They say "it's similar to Docker but easier" - I like the sound of that. So I check it out. It's EXACTLY like Solaris containers! Which I've been using for over 10 years - but, again, easier! It's pretty slick! And it installs by default on Slackware 14.2 but there's a few things you need to change.
ON THE HOST
Edit the /etc/rc.d/rc.inet1.confSlackware does not have a bridged network device by default BUT it does have it defined and commented out. I found this works nicely except I was expecting my host interface to use eth0 and lxc guest to use br0. It was not what I expected but it works fine!
# Example of how to configure a bridge:
# Note the added "BRNICS" variable which contains a space-separated list
# of the physical network interfaces you want to add to the bridge.
Routing = YesYou will, of course, need your host to route packets so
# chmod 755 /etc/rc.d/rc.ip_forward
And then start it or restart. I like to restart to make sure everything is the way it needs to be before relying on it. You could also just
# echo 0 >
Really the only other thing you need to do is add a bit to /etc/lxc/default.conf. This worked for me:
root@slacks:~# cat /etc/lxc/default.conf
ON THE LXC GUESTJust run netconfig and set a static address or DHCP and then restart rc.inet1.
WHAT LXC GUEST?!!Oh, I skipped that bit, eh? Super simple. Try this:
# lxc-create -n lxcguest -t /usr/share/lxc/templates/lxc-slackware
# lxc-start -n lxcguest -d
# lxc-console -n lxcguest (it'll tell you how to login)
Now, run netconfig.
What?! You're already running Slackware on the host and you'd like to try something different? Just run list the contents of /usr/share/lxc/templates and then try one or a dozen of the other 18 pre-installed templates. Like:
root@slacks:~# ls /usr/share/lxc/templates
lxc-alpine* lxc-cirros* lxc-openmandriva* lxc-sparclinux*
lxc-altlinux* lxc-debian* lxc-opensuse* lxc-sshd*
lxc-archlinux* lxc-download* lxc-oracle* lxc-ubuntu*
lxc-busybox* lxc-fedora* lxc-plamo* lxc-ubuntu-cloud*
lxc-centos* lxc-gentoo* lxc-slackware*
If you down like any of those, try something else with this command:
# lxc-create -t /usr/share/lxc/templates/lxc-download -n newguest
You will be given an even bigger choice. Knowing Slackware and how stable it is, I would stay with the local choices to ensure that legendary stability stays as is (but that's just me).