In the last video we discussed a couple of the issues that we're probably going to run to once we tried
to deploy our application.
So in this video we're going to discuss something called Docker.
We're gonna talk about how Docker is going to make our lives a lot easier particularly as we start to
go towards production with our application.
So let's talk are all about.
Well with Docker we're going to create a series of things called containers a container is like an isolated
computing environment.
It contains everything that is required to run one single program.
We're going to end up creating separate docker containers to run each of our individual services.
So we'll create one container to run the event plus one for posts one for comments and so on.
If we ever need multiple copies of some service say if we need multiple copies of comments then we will
start up a second docker container so we can really imagine that there's going to be a one to one pairing
between docker containers and each instance of our running program let's discuss why we are going to
use Docker at all and what problems it really solves.
So at present running our application makes some really big assumptions about the environment that we
are really running on.
Let me tell you what I mean by that.
How do we start up our application right now.
We run that command NPM start right to run NPM by itself.
We are assuming that Puma is installed on our local machine.
We are also making the assumption that node is installed on our local machine as well.
So just to run our program we are making those really big assumptions we're seeing NPM and Node are
both installed on our local machine one other thing to be aware of is that even running our application
requires some very precise knowledge about exactly how to start it up.
So we have to run the exact command NPM start in order to make each of these different services startup
and run.
So in total not only is starting up our application potentially confusing and kind of mysterious but
we also have these kind of implicit requirements about the environment that we're running our program
on the whole goal of Docker is to remove both those issues by creating containers we're going to wrap
up all the dependencies that a program requires.
So that means we're going to wrap up NPM and Node into this little isolated computing environment.
We're also going to include in that container some information about how to start up and run our program
as well.
So all you really need to understand about Docker at this point is that it makes it really easy to run
any arbitrary program you can possibly imagine not just no JSF programs but any other language.
Anything else you can just about possibly imagine starts to get really easy to run when you are using
Docker now.
Why is that relevant.
Well let's take a quick pause right here once again.
We're gonna come back the next video and start to discuss this thing called Coober nettles.
You're going to see how this Docker thing and this idea of making it really easy to run a program works
really well with Cuban eddies.