Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (47.6k points)

What is the difference between Docker and Vagrant? When should you use each one?

2 Answers

0 votes
by (106k points)
edited by

For spinning up a virtual machine vagrant uses virtualbox. It means that you can set up your own environment and install everything you need on that machine mostly through some provisioning scripts. 

On the other hand Docker uses images and containers to build your application as an image. An image is basically an instance of your application with all of its setup environment and requirements installed, however it's not a machine.

In order to learn docker and have a certificate in Docker then you can have a look at the following Docker Training Course. If you like to read then you can read the following tutorial on Docker. To watch the free video tutorials on Docker you can visit the below-mentioned website:-

0 votes
by (140 points)
Vagrant is more resource intensive since it spins up a virtual machine running another OS with dedicated filesystem and memory. It is slow, but was the only game in town before the faster-running Docker came along.

Docker "usually" runs on the same OS, but shares memory (though isolated), so the processes it contains should not interfere with anything outside the container. I say "usually" because running Docker in Windows or MacOS actually does use a virtual machine to host the Docker images.
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.5k questions

29.9k answers

500 comments

99.1k users

Browse Categories

...