WEBVTT
Kind: captions
Language: en

00:00:00.060 --> 00:00:06.060
A lot of people ask me why you would use
vagrant over docker and vice-versa in

00:00:06.060 --> 00:00:10.200
this video I'm going to explain the
differences between these two

00:00:10.200 --> 00:00:14.630
technologies and when it might make
sense to use one instead of the other

00:00:14.630 --> 00:00:20.340
both vagrant and docker are similar in
that they use virtualization technology

00:00:20.340 --> 00:00:25.710
to isolate the application from the
machine that is running on however they

00:00:25.710 --> 00:00:31.610
both do this in different ways and each
are better suited to different use cases

00:00:31.610 --> 00:00:34.460
so what is docker

00:00:34.460 --> 00:00:38.430
docker is an
open-source containerization tool that

00:00:38.430 --> 00:00:43.620
allows you to run your application in a
lightweight image it works by creating

00:00:43.620 --> 00:00:47.910
something called a docker file that
contains all of the steps required to

00:00:47.910 --> 00:00:50.960
build the image to run your application

00:00:50.960 --> 00:00:53.219
during the build stage docker installs

00:00:53.219 --> 00:00:58.140
all of the dependencies and code
required to run your app an image is

00:00:58.140 --> 00:01:02.520
typically based on a very lightweight
stripped-down version of the Linux

00:01:02.520 --> 00:01:07.020
operating system once you have your
image you can use it to run your

00:01:07.020 --> 00:01:11.640
application on your local development
machine or deploy it to a production

00:01:11.640 --> 00:01:13.740
server

00:01:13.740 --> 00:01:18.060
because docker is designed to run
in production it has a steeper learning

00:01:18.060 --> 00:01:21.180
curve compared to vagrant

00:01:21.180 --> 00:01:24.869
docker also
only has limited versions available for

00:01:24.869 --> 00:01:27.980
home editions of the Windows operating
system

00:01:27.980 --> 00:01:30.180
Vagrant is a tool used for

00:01:30.180 --> 00:01:34.590
managing virtual development
environments however it doesn't come

00:01:34.590 --> 00:01:37.700
with any virtualization technology out
of the box

00:01:37.700 --> 00:01:44.220
vagrant works by using something called
a hypervisor such as VirtualBox a tool

00:01:44.220 --> 00:01:49.560
that's used to run virtual machines on a
computer with vagrant you create a

00:01:49.560 --> 00:01:53.939
vagrant file which contains all of the
instructions for creating your

00:01:53.939 --> 00:01:59.280
development server vagrant then uses the
hypervisor to create and configure the

00:01:59.280 --> 00:02:01.620
server on your machine

00:02:01.620 --> 00:02:04.829
a vagrant server
usually consists of a slimmed-down

00:02:04.829 --> 00:02:10.520
but complete version of the Linux
operating system such as Ubuntu

00:02:11.380 --> 00:02:16.360
Because vagrant isn't designed to run in
production it has an easier learning

00:02:16.360 --> 00:02:18.660
curve compared to docker

00:02:18.660 --> 00:02:21.220
also as vagrant
supports a number of different

00:02:21.220 --> 00:02:27.120
hypervisors it has a wider range of
support for operating systems it runs on

00:02:27.120 --> 00:02:32.030
Vagrant should run on any machine in
which you can install and use VirtualBox

00:02:32.030 --> 00:02:36.629
you would use docker if you're looking
to streamline your workflow from

00:02:36.629 --> 00:02:41.129
development to production and all of
your developers on your project use a

00:02:41.129 --> 00:02:43.680
supported operating system

00:02:43.680 --> 00:02:46.880
vagrant is
preferred if you're just getting started

00:02:46.880 --> 00:02:50.970
or if you're looking for a development
environment that's supported on a wider

00:02:50.970 --> 00:02:54.620
range of operating systems

