Should I use Vagrant or Docker for creating an isolated environment?

0 votes

I use Ubuntu and I need an isolated environment.

I am considering either Vagrant or Docker for this purpose. Which is better?

Jul 18, 2018 in Docker by Nilesh
• 6,900 points
31 views

1 answer to this question.

0 votes

If your purpose is the isolation, I think Docker is what you need.

Vagrant is a virtual machine manager. It allows you to script the virtual machine configuration as well as the provisioning. However, it is still a virtual machine depending on VirtualBox (or others) with a huge overhead. It requires you to have a hard drive file that can be huge, it takes a lot of ram, and performance may be not very good.

Docker on the other hand uses kernel cgroup and namespacing via LXC. It means that you are using the same kernel as the host and the same file system. You can use Dockerfile with the docker build command in order to handle the provisioning and configuration of your container. You have an example at docs.docker.com on how to make your Dockerfile; it is very intuitive.

The only reason you could want to use Vagrant is if you need to do BSD, Windows or other non-Linux development on your Ubuntu box. Otherwise, go for Docker

answered Jul 18, 2018 by Kalgi
• 2,620 points

Related Questions In Docker

0 votes
1 answer

Vagrant or Docker for creating an isolated environment?

Vagrant is basically a virtual machine manager. ...READ MORE

answered Sep 28, 2018 in Docker by Tyrion anex
• 8,280 points
29 views
0 votes
1 answer

How do I force Docker for a clean build of an image ?

You can try the following step: You have ...READ MORE

answered Sep 7, 2018 in Docker by Damon Salvatore
• 5,490 points
594 views
0 votes
1 answer
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

Docker : multiples linked containers for each customers

Using Docker (specifically Docker Compose) linking containers ...READ MORE

answered Jul 11, 2018 in Docker by Kalgi
• 2,620 points
23 views
0 votes
1 answer

Error “unable to resolve host docker”

This error occurs because its not a ...READ MORE

answered Jul 10, 2018 in Docker by Kalgi
• 2,620 points
228 views