So whether you're on a mac or on a PC, this is what Docker Desktop should look like when it comes up
like a window like this, which is giving you your information.
And on the left here you'll see some navigation that containers is telling you all of these boxes running
on your box in their own little world, their own delicate, dedicated world.
An image is like a blueprint for making a container.
It's a description of a container.
If you're a Docker user, you'll have a gazillion of these.
Probably I did too, but I just deleted them all so that we'd come up empty like this.
And you basically can can pull down an image that's, that's, that's stored in a, in a remote hub
and bring that down so that you can have like running on your box.
Uh, and volumes are like disk drives, like little internal disk drives that are set up that are ring
fenced for your Docker container.
And I've got some old nonsense here that you can safely ignore, but we're about to create a volume
for Nan.
That's going to be the next thing we're going to do.
Uh, and, uh, the rest of this, you can you can safely ignore.
We're only going to really look at containers and volumes, to be honest.
That's where we will be.
And the next thing we're going to do is create a volume for like a disk that can be used within your
disk.
Uh, that will use for running on your computer.
So back here on the docs website, you'll see that it tells you how to start right here.
And basically it's got this bit of code right here.
And I'm just going to take this first line Docker volume.
Create any data whether you're on a mac or a PC.
Same thing.
Copy that into your clipboard because we're going to run it and we're going to run it in this terminal
thing.
And so if you're if you're using a PC, you now want to bring up that PowerShell thing I showed you.
Uh, apologies.
The technical people here, they're like, oh my goodness, I know what to do.
Uh, but for people new to it, it can be, uh, weird the first time.
And for Mac, people remember it's it's command space type terminal Spell it right.
Terminal.
You can't see what I'm doing here, but I'm messing around.
Terminal.
There we go.
And then here it is.
Here's the terminal.
I'm going to paste that in.
I'm going to press enter.
And this is telling Docker to create that volume.
And it's done.
If it didn't work if it didn't recognize the command docker first thing to do is to restart your computer,
launch Docker again.
Maybe some system path variable wasn't set.
If you got some error on PC that was about not having permissions to run a script, then just google
that error.
It's the super common setting that you might have to another command.
You might have to run on your PC.
That gives you the authority to be allowed to run a command like this, but that that should all be
relatively easy.
We should now have a volume called data.
Well, let's go and check that out back.
We need to go to Docker Desktop to see see how that looks.
Here's Docker desktop.
Let's go to volumes just here and check that out.
There's a new Nan data volume that has appeared and it has no bytes.
It's an empty volume that's set up and ready for N810 to be on it.
And we still have no containers.
Okay.
Next step is to actually run N810 and that's all it takes.
We're just going to run a command that's going to kick off N810.
So here we are back in the Nan docs.
And this part here is the command remaining to be run which is actually going to do it all.
Uh and it looks a bit intimidating the first time you see it.
There's a few things here, but never fear.
Uh, I do believe that on a PC, we need to edit this a bit, remove these slashes, and just have it
all on one line.
So?
So that it's just everything comes after another.
And I'm going to put that in the course resources just as it is, so that you can just copy and paste
from there if you wish.
Or you can just delete, uh, these, these backslashes and just make sure there's no empty line.
You just have everything on one line.
Uh, and the other thing is that it wants us to put in our time zone instead of this green stuff here.
And the place you find that is in this link here, your time zone click there.
It comes up with a bunch of time zones.
As of right now I am currently in in London so I would have to come down.
I believe it's Europe.
London would be my time zone.
Uh, that's going to be a lot of scrolling.
Uh, somewhere in here would be.
Here we go.
We're getting close.
Here's Europe, London.
That's where I am right now.
But, uh, you might be somewhere else.
You should pick wherever you are and make sure that that is what you include here.
Uh, and, uh, but for now.
So I'm going to take all of this.
Copy this.
We've already run this this create part.
We're going to run this command now in a terminal on a mac or in PowerShell on a PC.
Okay.
So, uh, back we go to, to the terminal again.
Terminal.
Uh, here it is.
So I'm going to start just by by pasting this in there.
Now I'm going to go back and I'm going to replace everything with what I care about.
I could also just press the up button rather than going through.
So for this first time zone here I'm going to delete that.
And I'm going to type Europe slash London.
And for this time zone here I'm going to delete that.
And I'm going to put Europe slash London.
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
like that, just just to remove these backslashes.
I think that that doesn't work on on all versions of the PC and bring it all onto one line.
And of course, this will also work just fine on a mac as well, all in one line like this and like
this.
And you're like, come on.
Uh, I know you get the idea, but I now I've started, I will finish up and this to there we go.
Minus v okay.
And now now that I finally put you through that, let me just explain what this crazy command is actually
doing.
I should also make this a bit bigger.
Of course.
Here we go.
There we go.
That's nice and big.
I'm sorry if you've been squinting in there.
Now you can actually see what I've done.
I've put it all on one line.
Uh, so what is this about?
So.
So the command begins Docker run, and that means it's instruction to Docker, the, the platform that's
running on your computer that tells it that there's something we want to do.
We want to run something.
Everything that comes after that is a bunch of different flags, giving it some special things about
it.
So you can see there's a flag called name that's saying, hey, I want to call this thing I'm about
to do.
I want to call it N810.
What we're actually about to do is we're about to start a Docker container.
We're about to start one of these, uh, these boxes within our box, these computers inside our computer,
and we're going to call it N810.
And there's a few other for the technical people, of course, you may well recognize things about this.
That minus p flag is saying, hey, look for this box within a box.
I want to take the port, the network port number five, six, seven, eight, and I want to map that
to port 5678 on my host computer so that if I'm on my host and I go to five, six, seven, eight,
it's going to go into the actual box within a box, the container and look on that port.
Those two ports will be connected.
And that's a very common trick with Docker containers.
The the other things there, the dash e these are setting environment variables.
So we're setting a bunch of environment variables about things like the time zone about some some ones
that Nan recommends we have about enforced settings file permissions and runners enabled.
And then uh there's this minus V which is about volumes.
And again only technical people need to worry about this.
But we're saying hey, we've got a volume called Nan Data.
That's the volume that we just set up inside the container.
When you ever go to slash home node, I want that to be actually going into this volume, the separate
disc that we've, that we've ring fenced for this purpose so that it's as if there's like a persistent
disk that's always pointing at any data.
So that's those are all the flags.
And finally, at the end of it all is the name of a docker, a Docker image, a description, a blueprint
for a Docker container that is described Docker.
So this is an, uh, website where they have a particular URL that you can see here.
And that serves up a Docker image, a description of what a container should look like with all the
details of that container.
And this is the key part.
This is the essential part.
This is where we are saying we want you to please Docker.
We want you to look this up, find this this Docker image, this description of what a container should
look like, and then build a container on my machine to do it.
That is what this command does.