-: In the last section, we built out our Docker image
using the development Docker file that we just put together.
When we built that image,
you might have noticed that we got a little line here
that we did not see previously.
It says "sending build context to Docker daemon,"
and then it printed out 155 megabytes.
So why are we seeing that here now
when we definitely did not see it previously?
Well, here's the issue.
When we just installed the Create React App tool
and used it to generate a new project,
that tool automatically installed all of our dependencies
into our project directory.
So our node modules folder right here
has a ton of different dependencies inside of it,
155 megabytes worth.
Now, in the past, we did not install
any of our dependencies into our working folder.
Instead, we have relied upon our Docker image
to install those dependencies
when the image was initially created.
So at present, we essentially have
two copies of dependencies, and we really do not need two.
The easiest solution here is to delete
the node modules folder inside of our working directory
which I'm gonna do right now.
So I'll delete that entire folder by moving it to trash.
If I now go and try to build my image a second time
using Docker build
and then force any Docker file.dev file to be used,
you'll notice that it goes much faster,
much faster like it was previously
when we were putting together our node server using Docker.
All right, so that's a good little fix.
Let's take another quick pause
and then try starting up a container out of this image
in the next section.