Isolated development environment on Ubuntu

I want to create an isolated ubuntu environment on which to install and configure some applications that need to comunicate on the network and be accessed through http. I want to be able to run my own version of java, apache and other binaries without interfering or being interfered by other user's binaries. And also do some further development. Would chroot be a sufficient solution?


Solution 1:

You should be looking at LXC container technology, either run raw, via libvirt or using a wrapper like Docker.

This should provide the isolation you need and is more robust than straight chroot.

Solution 2:

I would personally recommend using Docker, which will provide you with the necessary isolation that you're looking for.

https://www.docker.com/

Solution 3:

I would setup virtual clones in a kvm environment. Using virt-manager, you can setup the virtual guests to use NAT and then use iptables to drop any outbound packets to the "real" LAN.

If you want to get more fancy, you could setup a couple of linux boxes with multiple interfaces and actually replicate your entire LAN without changing any IP addresses:

[LAN/ETH0 10.1.1.1]-linuxfw-[ETH1 192.168.1.1]---[192.168.1.2 ETH0]-linuxfw-[10.1.1.1 ETH1]--[clones]