Narrator: In the last section
we created a docker compose file
to avoid having to run that really long docker run command.
However, when we tried to test out that docker compose file,
we ran into a little bit of an issue
because our docker file is not called docker file
which is the convention.
So in order to fix this,
we're gonna make a slight tweak to the build option
inside of our compose file.
Rather than saying, oh yeah I just look
into the current working directory for that docker file,
we're going to replace that dot with two additional options.
So the first thing we're going to do, is add a context.
This context option is essentially specifying
where we want all the files and folders
for this image to be pulled from.
So in this case, we definitely want
all the files and folders for our project
to come from the same directory as docker compose
or essentially the current working directory.
So to indicate that, we'll add a simple dot.
If we had nested our react project right here.
If we had nested it inside of some folder
then we would have specified that folder.
So we could have said something like
look into my react project folder
inside this directory to find all the files
for our project.
We're going to pass in a second option as well.
This one's gonna be a little bit more obvious
we'll say docker file.
So this is just gonna be the location
of the docker file that's gonna be used
to construct the image for this web service.
So for this, we'll say docker file.dev, like so.
And as you might guess,
this is indicating look in the current working directory
find a file with that name, use it to build the image.
All right, so let's save this
and then we'll try running docker compose up again.
So back in my terminal,
I'll do docker compose up,
and there we go.
Now it's successfully building.
So we're going to take a minute or two
to run the end view install.
Let's take a quick pause right here and just let that go.
And then in the next section,
we'll be able to test everything out again.
So quick break and I'll see you in just a minute.