WEBVTT

00:00.780 --> 00:01.950
-: We've now successfully learned

00:01.950 --> 00:03.780
how to create a Docker image

00:03.780 --> 00:06.450
in order to run Redis on our machine locally.

00:06.450 --> 00:07.470
But there's still a lot to learn

00:07.470 --> 00:10.170
about creating image in running Docker applications.

00:10.170 --> 00:12.990
So in this section we're gonna kick off a new project.

00:12.990 --> 00:14.250
The goal of this project

00:14.250 --> 00:17.820
is to create a tiny Node.js web application,

00:17.820 --> 00:19.740
wrap it inside of a Docker container,

00:19.740 --> 00:22.470
and then be able to access that web application

00:22.470 --> 00:25.590
from a browser running on your local machine.

00:25.590 --> 00:27.840
We're not gonna worry about deploying this app right now.

00:27.840 --> 00:30.270
We're just focused on getting Node.js to work

00:30.270 --> 00:32.610
inside of a Docker container.

00:32.610 --> 00:34.980
Let me first begin by showing you a quick outline

00:34.980 --> 00:38.010
of some of the steps that we're going to go through.

00:38.010 --> 00:39.090
So the first thing we have to do

00:39.090 --> 00:42.330
is create an actual Node.js web application.

00:42.330 --> 00:45.060
Now, if you don't have any experience with Node.js

00:45.060 --> 00:46.620
and you are more of a Java person

00:46.620 --> 00:49.620
or Ruby or whatever it might be, that is totally fine.

00:49.620 --> 00:50.730
The code that we're gonna write

00:50.730 --> 00:53.220
for the JavaScript side of things is totally optional.

00:53.220 --> 00:55.470
So you can either watch the video

00:55.470 --> 00:56.970
where we will put together the server,

00:56.970 --> 00:58.770
or you can entirely skip it

00:58.770 --> 01:00.840
and you can just download the single file

01:00.840 --> 01:03.210
or one or two files that you're going to need.

01:03.210 --> 01:05.310
So if you don't know anything about Node.js,

01:05.310 --> 01:06.813
no problem whatsoever.

01:07.680 --> 01:09.540
After we create the Node.js web app,

01:09.540 --> 01:11.940
we'll then author a Docker file.

01:11.940 --> 01:14.850
We're gonna make a Docker file to create an image

01:14.850 --> 01:17.730
that is going to be used to run our web server

01:17.730 --> 01:19.530
inside of a container.

01:19.530 --> 01:21.720
So we're going to build the image from the Docker file.

01:21.720 --> 01:24.600
We will run the image as a container on our local machine

01:24.600 --> 01:25.740
and then we will make sure

01:25.740 --> 01:28.890
that we are able to connect to that running web application

01:28.890 --> 01:31.233
inside the container from our browser.

01:32.310 --> 01:35.880
Now, last thing I wanna mention here, and this might be

01:35.880 --> 01:37.530
something that makes you a little bit unhappy,

01:37.530 --> 01:40.170
but I'm just gonna throw a disclaimer out here.

01:40.170 --> 01:42.600
We're going to do some things in this project

01:42.600 --> 01:44.280
a little bit wrong.

01:44.280 --> 01:46.230
So when we put together our Docker file,

01:46.230 --> 01:48.510
we're going to make a couple of mistakes.

01:48.510 --> 01:50.820
And we're doing this very much on purpose

01:50.820 --> 01:52.530
because these are going to be some mistakes

01:52.530 --> 01:54.330
that I really expect you to make

01:54.330 --> 01:57.660
when you start working on Docker on your own projects.

01:57.660 --> 01:59.700
So I want you to see these mistakes.

01:59.700 --> 02:01.230
I want you to see the error messages,

02:01.230 --> 02:03.690
and I want you to learn how to fix them.

02:03.690 --> 02:05.730
So just quick disclaimer, you know, again,

02:05.730 --> 02:07.920
we're gonna do things just a little bit wrong.

02:07.920 --> 02:08.753
Don't worry.

02:08.753 --> 02:10.920
I will be very clear when we come across an error,

02:10.920 --> 02:13.020
and I will say very, very clearly,

02:13.020 --> 02:14.340
hey, we did this on purpose,

02:14.340 --> 02:16.530
here's the mistake, and here's how to fix it.

02:16.530 --> 02:18.210
I know that sometimes in a tutorial,

02:18.210 --> 02:21.180
it's really frustrating when things are done incorrectly.

02:21.180 --> 02:22.013
I'm totally aware of that

02:22.013 --> 02:23.310
so I'm gonna make sure that these errors

02:23.310 --> 02:26.430
are as distinct and highlighted as possible.

02:26.430 --> 02:28.650
All right, so with that in mind, let's take a quick break.

02:28.650 --> 02:30.420
When we come back, the next section, we're gonna start

02:30.420 --> 02:33.300
putting together this Node.js web application.

02:33.300 --> 02:34.950
So I'll see you in just a minute.
