DEV Community

Kristjan Grm
Kristjan Grm

Posted on

Should every project be in its own VirtualBox VM?

Hello everyone, I got an idea that instead of making a new folder for every project that I have, I should really create a virtual machine that has all the dependencies loaded etc...

At my job we have loads of different project that use different versions of python/java etc... and sometimes it is really time consuming setting everything up.

Your thoughts / advice?

Top comments (10)

Collapse
 
rhymes profile image
rhymes
Collapse
 
avalander profile image
Avalander

I was going to suggest the same. I use docker a lot, it's really convenient if you work with multiple stacks to avoid polluting your machine with a dozen different runtimes and build systems, and hundreds of native libraries and packages.

Collapse
 
grmkris profile image
Kristjan Grm

Thanks for your reply! But when I have Docker running on my computer I cannot use VirtualBox because one of them requires certain feature to be turned off or something like that.

I use virtualbox for its visual expirience aswell. Is it possible to run docker as a virtual machine with desktop and everything?

Collapse
 
osde8info profile image
Clive Da

yes absolutely use docker in your vm preferably with a lightweight distro such as lubuntu or xubuntu

Collapse
 
osde8info profile image
Clive Da

absolutely use docker for each new project (works fine inside an xubuntu virtualbox vm)

Collapse
 
deciduously profile image
Ben Lovy

I'd also recommend looking at Vagrant, might be closer to what you're trying to do than Docker.

Collapse
 
grmkris profile image
Kristjan Grm

Thanks for your recommendation.

Would it be possible to achive the following with Vagrant:

I have an Access Database that I connect to with specific version of Java. In order to make this work you have to register ODBC DataSource inside Windows10, there are 32bit and 64bit versions and if you have 64bit office installed the 32bit version becomes unusable... so a really big clusterfuck so everytime the client wants me to change something I have to go through the process of setting everything up (this happens 2-4 times a year) so there is a good chance I changed the machine / software etc...

For the reasons above I have a special VirtualBox instance just for this where everything is set up and ready to work. (correct ODBC driver installed, correct 32bit version of office installed, correct version of java, etc....)

Collapse
 
deciduously profile image
Ben Lovy

I haven't had personally quite the same use case but from what I understand, yes. This problem should be solvable with Vagrant, likely easier than setting up by hand.

Thread Thread
 
grmkris profile image
Kristjan Grm

will take a look into it. my main goal would be to have all the vagrant images in repository that is version controlled. so everytime a new developer picks up a project it should work out of the box regardless of his machine as long as Vagrant/Docker/Virtualbox is supported on the machine

Thread Thread
 
deciduously profile image
Ben Lovy

Yep - I think the idea is to just store your Vagrantfiles in said repo. The images can be reproduced entirely from the files.