WEBVTT

00:00.120 --> 00:04.680
So whether you're on a mac or on a PC, this is what Docker Desktop should look like when it comes up

00:04.720 --> 00:08.480
like a window like this, which is giving you your information.

00:08.480 --> 00:15.440
And on the left here you'll see some navigation that containers is telling you all of these boxes running

00:15.440 --> 00:19.760
on your box in their own little world, their own delicate, dedicated world.

00:20.200 --> 00:23.640
An image is like a blueprint for making a container.

00:23.640 --> 00:25.640
It's a description of a container.

00:25.640 --> 00:27.920
If you're a Docker user, you'll have a gazillion of these.

00:27.960 --> 00:32.560
Probably I did too, but I just deleted them all so that we'd come up empty like this.

00:32.760 --> 00:37.920
And you basically can can pull down an image that's, that's, that's stored in a, in a remote hub

00:37.960 --> 00:43.040
and bring that down so that you can have like running on your box.

00:43.240 --> 00:49.040
Uh, and volumes are like disk drives, like little internal disk drives that are set up that are ring

00:49.080 --> 00:52.120
fenced for your Docker container.

00:52.120 --> 00:57.480
And I've got some old nonsense here that you can safely ignore, but we're about to create a volume

00:57.480 --> 00:58.560
for Nan.

00:58.600 --> 01:00.200
That's going to be the next thing we're going to do.

01:00.670 --> 01:03.390
Uh, and, uh, the rest of this, you can you can safely ignore.

01:03.430 --> 01:05.950
We're only going to really look at containers and volumes, to be honest.

01:05.950 --> 01:07.270
That's where we will be.

01:07.310 --> 01:14.230
And the next thing we're going to do is create a volume for like a disk that can be used within your

01:14.230 --> 01:14.630
disk.

01:14.710 --> 01:17.910
Uh, that will use for running on your computer.

01:17.950 --> 01:25.710
So back here on the docs website, you'll see that it tells you how to start right here.

01:25.910 --> 01:29.270
And basically it's got this bit of code right here.

01:29.270 --> 01:32.670
And I'm just going to take this first line Docker volume.

01:32.670 --> 01:35.990
Create any data whether you're on a mac or a PC.

01:36.110 --> 01:36.910
Same thing.

01:37.030 --> 01:41.510
Copy that into your clipboard because we're going to run it and we're going to run it in this terminal

01:41.510 --> 01:41.950
thing.

01:41.990 --> 01:47.670
And so if you're if you're using a PC, you now want to bring up that PowerShell thing I showed you.

01:47.910 --> 01:49.230
Uh, apologies.

01:49.230 --> 01:52.230
The technical people here, they're like, oh my goodness, I know what to do.

01:52.350 --> 01:55.630
Uh, but for people new to it, it can be, uh, weird the first time.

01:55.630 --> 02:01.430
And for Mac, people remember it's it's command space type terminal Spell it right.

02:01.470 --> 02:02.910
Terminal.

02:02.950 --> 02:05.030
You can't see what I'm doing here, but I'm messing around.

02:05.070 --> 02:05.590
Terminal.

02:05.630 --> 02:06.150
There we go.

02:06.150 --> 02:07.310
And then here it is.

02:07.310 --> 02:08.310
Here's the terminal.

02:08.310 --> 02:09.710
I'm going to paste that in.

02:09.750 --> 02:11.230
I'm going to press enter.

02:11.230 --> 02:14.670
And this is telling Docker to create that volume.

02:14.670 --> 02:15.750
And it's done.

02:16.670 --> 02:21.670
If it didn't work if it didn't recognize the command docker first thing to do is to restart your computer,

02:21.670 --> 02:22.830
launch Docker again.

02:22.870 --> 02:26.030
Maybe some system path variable wasn't set.

02:26.550 --> 02:32.950
If you got some error on PC that was about not having permissions to run a script, then just google

02:32.950 --> 02:33.510
that error.

02:33.510 --> 02:36.790
It's the super common setting that you might have to another command.

02:36.790 --> 02:38.030
You might have to run on your PC.

02:38.190 --> 02:44.350
That gives you the authority to be allowed to run a command like this, but that that should all be

02:44.350 --> 02:45.030
relatively easy.

02:45.070 --> 02:48.790
We should now have a volume called data.

02:49.230 --> 02:50.750
Well, let's go and check that out back.

02:50.750 --> 02:54.190
We need to go to Docker Desktop to see see how that looks.

02:54.190 --> 02:55.390
Here's Docker desktop.

02:55.550 --> 02:59.030
Let's go to volumes just here and check that out.

02:59.030 --> 03:03.260
There's a new Nan data volume that has appeared and it has no bytes.

03:03.260 --> 03:07.820
It's an empty volume that's set up and ready for N810 to be on it.

03:07.820 --> 03:09.580
And we still have no containers.

03:09.780 --> 03:10.420
Okay.

03:10.460 --> 03:14.220
Next step is to actually run N810 and that's all it takes.

03:14.260 --> 03:17.780
We're just going to run a command that's going to kick off N810.

03:17.820 --> 03:19.580
So here we are back in the Nan docs.

03:19.580 --> 03:24.500
And this part here is the command remaining to be run which is actually going to do it all.

03:24.700 --> 03:27.220
Uh and it looks a bit intimidating the first time you see it.

03:27.220 --> 03:29.540
There's a few things here, but never fear.

03:29.780 --> 03:36.820
Uh, I do believe that on a PC, we need to edit this a bit, remove these slashes, and just have it

03:36.820 --> 03:38.220
all on one line.

03:38.220 --> 03:38.500
So?

03:38.500 --> 03:40.540
So that it's just everything comes after another.

03:40.540 --> 03:45.100
And I'm going to put that in the course resources just as it is, so that you can just copy and paste

03:45.100 --> 03:45.980
from there if you wish.

03:45.980 --> 03:50.300
Or you can just delete, uh, these, these backslashes and just make sure there's no empty line.

03:50.300 --> 03:51.820
You just have everything on one line.

03:52.220 --> 03:57.500
Uh, and the other thing is that it wants us to put in our time zone instead of this green stuff here.

03:57.700 --> 04:01.690
And the place you find that is in this link here, your time zone click there.

04:01.690 --> 04:03.490
It comes up with a bunch of time zones.

04:03.810 --> 04:08.770
As of right now I am currently in in London so I would have to come down.

04:08.770 --> 04:09.850
I believe it's Europe.

04:10.250 --> 04:12.010
London would be my time zone.

04:12.170 --> 04:14.250
Uh, that's going to be a lot of scrolling.

04:14.370 --> 04:15.770
Uh, somewhere in here would be.

04:15.770 --> 04:16.210
Here we go.

04:16.210 --> 04:17.130
We're getting close.

04:17.130 --> 04:18.170
Here's Europe, London.

04:18.170 --> 04:19.410
That's where I am right now.

04:19.570 --> 04:21.170
But, uh, you might be somewhere else.

04:21.210 --> 04:25.290
You should pick wherever you are and make sure that that is what you include here.

04:25.490 --> 04:27.330
Uh, and, uh, but for now.

04:27.330 --> 04:29.130
So I'm going to take all of this.

04:29.130 --> 04:29.530
Copy this.

04:29.570 --> 04:31.490
We've already run this this create part.

04:31.530 --> 04:36.290
We're going to run this command now in a terminal on a mac or in PowerShell on a PC.

04:36.530 --> 04:37.170
Okay.

04:37.450 --> 04:41.650
So, uh, back we go to, to the terminal again.

04:41.810 --> 04:42.930
Terminal.

04:43.370 --> 04:44.690
Uh, here it is.

04:44.970 --> 04:48.770
So I'm going to start just by by pasting this in there.

04:48.970 --> 04:55.850
Now I'm going to go back and I'm going to replace everything with what I care about.

04:55.850 --> 04:58.370
I could also just press the up button rather than going through.

04:58.490 --> 05:02.090
So for this first time zone here I'm going to delete that.

05:02.090 --> 05:05.410
And I'm going to type Europe slash London.

05:06.170 --> 05:09.010
And for this time zone here I'm going to delete that.

05:09.010 --> 05:13.290
And I'm going to put Europe slash London.

05:14.690 --> 05:21.410
If you're doing this on a PC then I recommend you come to each of these and you put it all on one line

05:21.410 --> 05:25.130
like that, just just to remove these backslashes.

05:25.130 --> 05:30.250
I think that that doesn't work on on all versions of the PC and bring it all onto one line.

05:30.250 --> 05:38.490
And of course, this will also work just fine on a mac as well, all in one line like this and like

05:38.610 --> 05:39.130
this.

05:40.890 --> 05:43.610
And you're like, come on.

05:44.050 --> 05:52.730
Uh, I know you get the idea, but I now I've started, I will finish up and this to there we go.

05:52.770 --> 05:56.210
Minus v okay.

05:56.490 --> 06:02.120
And now now that I finally put you through that, let me just explain what this crazy command is actually

06:02.120 --> 06:02.400
doing.

06:02.440 --> 06:04.120
I should also make this a bit bigger.

06:04.120 --> 06:04.840
Of course.

06:05.040 --> 06:05.760
Here we go.

06:05.800 --> 06:06.320
There we go.

06:06.360 --> 06:07.400
That's nice and big.

06:07.400 --> 06:09.480
I'm sorry if you've been squinting in there.

06:09.520 --> 06:10.920
Now you can actually see what I've done.

06:10.920 --> 06:12.320
I've put it all on one line.

06:12.680 --> 06:15.160
Uh, so what is this about?

06:15.160 --> 06:15.480
So.

06:15.520 --> 06:22.560
So the command begins Docker run, and that means it's instruction to Docker, the, the platform that's

06:22.560 --> 06:25.360
running on your computer that tells it that there's something we want to do.

06:25.400 --> 06:26.840
We want to run something.

06:27.240 --> 06:32.040
Everything that comes after that is a bunch of different flags, giving it some special things about

06:32.040 --> 06:32.280
it.

06:32.280 --> 06:36.600
So you can see there's a flag called name that's saying, hey, I want to call this thing I'm about

06:36.600 --> 06:37.000
to do.

06:37.040 --> 06:38.600
I want to call it N810.

06:39.000 --> 06:42.840
What we're actually about to do is we're about to start a Docker container.

06:42.840 --> 06:48.600
We're about to start one of these, uh, these boxes within our box, these computers inside our computer,

06:48.600 --> 06:50.600
and we're going to call it N810.

06:50.960 --> 06:55.600
And there's a few other for the technical people, of course, you may well recognize things about this.

06:55.600 --> 06:59.550
That minus p flag is saying, hey, look for this box within a box.

06:59.550 --> 07:05.110
I want to take the port, the network port number five, six, seven, eight, and I want to map that

07:05.110 --> 07:10.710
to port 5678 on my host computer so that if I'm on my host and I go to five, six, seven, eight,

07:10.750 --> 07:15.950
it's going to go into the actual box within a box, the container and look on that port.

07:15.950 --> 07:17.630
Those two ports will be connected.

07:17.630 --> 07:20.910
And that's a very common trick with Docker containers.

07:21.590 --> 07:26.670
The the other things there, the dash e these are setting environment variables.

07:26.670 --> 07:31.710
So we're setting a bunch of environment variables about things like the time zone about some some ones

07:31.710 --> 07:36.790
that Nan recommends we have about enforced settings file permissions and runners enabled.

07:37.230 --> 07:41.910
And then uh there's this minus V which is about volumes.

07:42.070 --> 07:44.590
And again only technical people need to worry about this.

07:44.590 --> 07:48.070
But we're saying hey, we've got a volume called Nan Data.

07:48.070 --> 07:51.550
That's the volume that we just set up inside the container.

07:51.670 --> 08:00.350
When you ever go to slash home node, I want that to be actually going into this volume, the separate

08:00.350 --> 08:05.390
disc that we've, that we've ring fenced for this purpose so that it's as if there's like a persistent

08:05.390 --> 08:08.550
disk that's always pointing at any data.

08:08.950 --> 08:10.790
So that's those are all the flags.

08:10.790 --> 08:19.350
And finally, at the end of it all is the name of a docker, a Docker image, a description, a blueprint

08:19.350 --> 08:23.310
for a Docker container that is described Docker.

08:25.070 --> 08:31.830
So this is an, uh, website where they have a particular URL that you can see here.

08:31.830 --> 08:38.150
And that serves up a Docker image, a description of what a container should look like with all the

08:38.150 --> 08:39.590
details of that container.

08:39.590 --> 08:40.910
And this is the key part.

08:40.950 --> 08:42.670
This is the essential part.

08:42.830 --> 08:46.070
This is where we are saying we want you to please Docker.

08:46.070 --> 08:51.630
We want you to look this up, find this this Docker image, this description of what a container should

08:51.630 --> 08:55.910
look like, and then build a container on my machine to do it.

08:56.190 --> 08:57.870
That is what this command does.
