Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:06,160 --> 00:00:09,700
OK so this lecture is for getting the tool box installed.
2
00:00:09,700 --> 00:00:16,780
That means you're using Windows 10 Home, or one of the older versions of Windows like 7, 8, or 8.1.
3
00:00:16,840 --> 00:00:20,160
Even though the Toolbox is legacy, it's still got some pretty cool features.
4
00:00:20,320 --> 00:00:25,520
In this lecture, we're going to actually download and install it, then we're going to clone my GitHub
5
00:00:25,540 --> 00:00:32,530
repo, then we're going to start the QuickStart Terminal and that is actually the command line interface
6
00:00:32,540 --> 00:00:35,070
that Docker gives you for the Toolbox.
7
00:00:35,240 --> 00:00:39,760
Then we're going to maybe tweak some of the VM settings or at least show you how to do that.
8
00:00:39,860 --> 00:00:46,250
And finally getting a code editor and seeing how we might change the shell out so maybe you can use
9
00:00:46,250 --> 00:00:51,480
a different shell instead the default command prompt that comes with Windows.
10
00:00:51,610 --> 00:00:51,930
All right.
11
00:00:51,930 --> 00:00:59,090
As you can see I'm on a Windows 8 machine, actually 8.1, and I'm actually already on store.docker.com
12
00:00:59,090 --> 00:00:59,560
...
13
00:00:59,610 --> 00:01:01,520
And like all the other editions of Docker,
14
00:01:01,520 --> 00:01:02,810
this is where you get it.
15
00:01:02,810 --> 00:01:08,910
So for Windows we're under Docker CE. Then we scroll down until we find Windows.
16
00:01:09,070 --> 00:01:11,510
Now for the Toolbox, it's not the default option.
17
00:01:11,510 --> 00:01:16,510
So if you notice up here at the top, it talks about that it needs Windows Professional
18
00:01:16,520 --> 00:01:18,230
10 or Enterprise.
19
00:01:18,290 --> 00:01:21,640
And then there's "for previous versions get Docker Toolbox."
20
00:01:21,800 --> 00:01:29,210
So let's click on that and that will take us to a previous site where you could actually get stuff from
21
00:01:29,210 --> 00:01:31,340
Docker which was on the docker.com site.
22
00:01:31,340 --> 00:01:33,800
This is where the ToolBox is living for now.
23
00:01:33,800 --> 00:01:38,200
Eventually it may go and live in the store but you just download the one for Windows.
24
00:01:38,210 --> 00:01:40,660
It's the same one for all versions of Windows.
25
00:01:42,560 --> 00:01:44,730
And I happen to already have that downloaded.
26
00:01:44,750 --> 00:01:46,340
So right here,
27
00:01:46,340 --> 00:01:50,580
just run that install and it'll walk you through the set up.
28
00:01:50,580 --> 00:01:53,360
Now I recommend you do a full install here.
29
00:01:53,360 --> 00:01:57,560
So on all the options, you want checked.
30
00:01:57,720 --> 00:02:02,090
And in my case I actually already have it installed so it didn't check them all by default, but for yours,
31
00:02:02,120 --> 00:02:03,830
it should have them all checked.
32
00:02:03,860 --> 00:02:09,080
You want VirtualBox because that's how it's going to run the Linux VM in the background it's actually
33
00:02:09,080 --> 00:02:17,030
going to run Docker for us. The Git for Windows allows us to actually have a Bash prompt that will
34
00:02:17,090 --> 00:02:20,950
make it seem a little bit more like Linux or Mac when we're using Docker.
35
00:02:21,140 --> 00:02:27,840
So let's say now that I've finished my Docker install and I'm going to DoubleClick the Docker QuickStart.
36
00:02:27,950 --> 00:02:32,400
And that will automatically kick off the initialization process.
37
00:02:32,480 --> 00:02:37,580
What that looks like is you'll see it's running something called the pre-create checks
38
00:02:37,640 --> 00:02:44,210
and it's actually creating a VirtualBox VM and it's using a boot2docker.iso to do that, which is
39
00:02:44,510 --> 00:02:47,410
a very small version of Linux.
40
00:02:47,600 --> 00:02:51,890
Then you see that it's provisioning from networking now is probably going to prompt you a couple of
41
00:02:51,890 --> 00:02:54,110
times for permissions.
42
00:02:54,110 --> 00:02:56,420
That's totally normal that's a VirtualBox thing.
43
00:02:56,630 --> 00:03:02,810
Eventually it'll get down to where you see the Moby, in ASCII format.
44
00:03:02,810 --> 00:03:11,060
And that's a signal that it's working and you'll see that it's giving me a default machine IP of
45
00:03:11,090 --> 00:03:19,550
192.168.99.100. Remember that this is in the resource lecture earlier in the section.
46
00:03:19,560 --> 00:03:23,780
Now I'm going to clone this, but I want to clone it in Desktop.
47
00:03:23,800 --> 00:03:27,630
If you've never used GitHub before, then you can use a GUI.
48
00:03:27,690 --> 00:03:30,920
And that's probably one of the easiest ways if you're not used to GitHub. If you know GitHub then
49
00:03:30,930 --> 00:03:32,370
you've got your own way to do it.
50
00:03:32,430 --> 00:03:40,760
But here what I can do is I can actually use the GitHub GUI to download and clone my repo.
51
00:03:40,950 --> 00:03:43,420
So I'm going to install that.
52
00:03:43,610 --> 00:03:49,900
Then I'm actually going to put all of my code in a directory called code.
53
00:03:49,940 --> 00:03:57,600
So I'm going to make a directory. You'll see on my machine, that I actually put all of my software code inside
54
00:03:57,600 --> 00:04:00,270
a directory called code on underneath my user.
55
00:04:00,390 --> 00:04:03,400
So that's where I'm going to clone this from GitHub.
56
00:04:03,510 --> 00:04:11,410
So I'm going to log in as me. Now that I have GitHub installed, one of the ways I can clone it is
57
00:04:12,400 --> 00:04:19,269
from the website, I can copy the URL and go back over to desktop and say clone repository.
58
00:04:19,360 --> 00:04:22,190
Copy that in. Remember I wanted...
59
00:04:22,240 --> 00:04:24,150
This is not going to be under Documents.
60
00:04:24,160 --> 00:04:27,390
It's going to be under code, that's where I put my stuff.
61
00:04:27,820 --> 00:04:34,190
So clone. Now the advantage of doing it this way instead of downloading the zip, is that you can come
62
00:04:34,190 --> 00:04:41,030
in here and update it because I do update this repo when there's fixes or changes in Docker which happens
63
00:04:41,030 --> 00:04:43,470
pretty pretty much every month.
64
00:04:43,760 --> 00:04:50,870
So now if I do a dir in here, you can see them in the udemy docker mastery directory, and there
65
00:04:50,870 --> 00:04:51,450
we go.
66
00:04:53,740 --> 00:04:57,670
The last thing I want to point out is you need a code editor of some sort.
67
00:04:57,670 --> 00:05:01,380
It's not that great to use notepad even though it does work.
68
00:05:01,420 --> 00:05:04,090
So I recommend Visual Studio Code.
69
00:05:07,270 --> 00:05:14,000
It's a free editor from Microsoft and you can get it over just by googling visual studio code and it's
70
00:05:14,000 --> 00:05:18,900
free to download, runs on Mac, Windows, and Linux.
71
00:05:19,040 --> 00:05:24,770
And actually it's running on the atom platform if you've ever played with Atom which is another editor
72
00:05:24,770 --> 00:05:31,250
from GitHub, But this one actually has a nice add-on for Docker and a lot of other nice features that
73
00:05:31,310 --> 00:05:33,120
I think really are great out of the box.
74
00:05:33,320 --> 00:05:37,940
So download that you might see me use a couple of times during the course.
75
00:05:37,940 --> 00:05:39,120
And there you go.
76
00:05:42,720 --> 00:05:48,570
What's happening in the background here is VirtualBox is actually running silently and you don't see
77
00:05:48,570 --> 00:05:52,950
the GUI necessarily but it doesn't mean it's not running it's actually sitting here running what
78
00:05:52,950 --> 00:05:56,050
was automatically created which was the default machine.
79
00:05:56,460 --> 00:06:01,830
So this is actually just a regular VM running Linux. Even though it is a small and limited version of
80
00:06:01,830 --> 00:06:03,600
Linux that Docker installed,
81
00:06:03,600 --> 00:06:06,790
you can change the properties of it especially when it comes to the hardware.
82
00:06:06,900 --> 00:06:14,580
So I can't change anything right now because it's running so I could do a shut down here and then once
83
00:06:14,580 --> 00:06:19,620
it's shut down, I could actually go in and change settings like how many CPUs it has access to, or how
84
00:06:19,620 --> 00:06:21,400
much ram it has access to.
85
00:06:21,450 --> 00:06:25,380
And that's really just dependent upon your system and how many resources you have.
86
00:06:25,380 --> 00:06:30,060
For example, by default it gives it a GB of RAM and a single processor.
87
00:06:30,060 --> 00:06:36,210
Maybe I want to bump it up to two and maybe I want to give it 2GBs of RAM.
88
00:06:36,210 --> 00:06:39,350
I can just put that up something like that.
89
00:06:39,480 --> 00:06:43,010
And then click OK. I could start it from here,
90
00:06:43,170 --> 00:06:48,420
but we also can control it from something called Docker Machine. There will be a later lecture
91
00:06:48,420 --> 00:06:50,040
on what Docker Machine can do.
92
00:06:50,190 --> 00:06:57,540
But fundamentally Docker Machine creates VMs either in the cloud or on your local machine that run
93
00:06:57,660 --> 00:07:00,490
Docker. If I just do a docker machine ls here,
94
00:07:00,490 --> 00:07:05,400
you'll see that it sees the machine that it's automatically created, and the first machine it
95
00:07:05,400 --> 00:07:13,720
creates, it always creates as default, and I could actually start it with docker machine start.
96
00:07:13,720 --> 00:07:16,590
You'll see that it actually kick it off here.
97
00:07:16,590 --> 00:07:21,030
And so I don't ever really need to use Oracle VM virtual box manager.
98
00:07:21,040 --> 00:07:24,970
I don't actually have to play with that at all unless I want to change the hardware settings.
99
00:07:24,970 --> 00:07:31,360
So now while that's starting and getting its IP again so that we can mess with it, I want to talk a little bit
100
00:07:31,360 --> 00:07:33,990
about this QuickStart terminal.
101
00:07:34,150 --> 00:07:38,410
So this is actually the default way. You need to run this at least once because then it's going to
102
00:07:38,410 --> 00:07:43,450
automatically create that default machine. It's automatically going to set it up and do the
103
00:07:43,450 --> 00:07:44,560
networking for you.
104
00:07:44,560 --> 00:07:47,150
But after that you don't have to use it.
105
00:07:47,170 --> 00:07:50,520
As long as you can get the Docker Machine from somewhere,
106
00:07:50,680 --> 00:07:53,140
you can run Docker Machine in the Docker command line.
107
00:07:56,320 --> 00:08:03,010
if you're a little bit more savvy user and you want to do a custom command line or a custom shell and
108
00:08:03,010 --> 00:08:03,850
terminal.
109
00:08:03,880 --> 00:08:04,570
You can try.
110
00:08:04,570 --> 00:08:07,990
Commander, cmder.net,
111
00:08:08,350 --> 00:08:13,720
and it really just changes the GUI and the functionality around that GUI. It's still inside it
112
00:08:13,720 --> 00:08:19,880
running a PowerShell or cmd prompt or Bash, but it does give you a lot of features around the GUI.
113
00:08:20,020 --> 00:08:23,290
I recommend downloading and extracting the full version.
114
00:08:23,590 --> 00:08:31,510
And when you do that, make sure that you right click on the zip file and go into properties and unblock it.
115
00:08:31,510 --> 00:08:36,820
Because once you unzip it, it doesn't actually have an installer you just need to unzip it and once
116
00:08:36,820 --> 00:08:40,980
you unzip it, it won't run without a bunch of warnings and problems
117
00:08:41,020 --> 00:08:46,150
unless you unlock it first...because it considers that a security feature in Windows; you've probably run into
118
00:08:46,150 --> 00:08:47,000
that before.
119
00:08:47,170 --> 00:08:50,200
So extract all that. You can extract that right into your Downloads folder.
120
00:08:50,200 --> 00:08:51,260
That's what I do.
121
00:08:51,490 --> 00:08:54,750
And then inside cmder you'll see something called cmder.
122
00:08:54,750 --> 00:08:58,800
And if you simply run that by default it'll give you a command prompt, a
123
00:08:58,810 --> 00:09:05,470
cmd.exe, and you'll see that you have some cool options here where I can actually run a PowerShell
124
00:09:05,480 --> 00:09:12,610
prompt if I want. I can run multiple tabs and a lot of other nice features where I can actually expand
125
00:09:12,610 --> 00:09:14,320
it and shrink it at will.
126
00:09:14,680 --> 00:09:15,460
And that's great.
127
00:09:15,520 --> 00:09:17,320
But how do we get Docker running in that.
128
00:09:17,500 --> 00:09:18,990
Well it's not that hard.
129
00:09:19,000 --> 00:09:20,920
It just takes a few extra steps.
130
00:09:21,070 --> 00:09:23,920
So you can see over here that I have docker machine ls
131
00:09:26,440 --> 00:09:32,880
LS, and that shows me that I have one machine with Docker running and as you learn in future lectures
132
00:09:32,970 --> 00:09:40,290
in the next section, I can do a Docker version that will tell me the Docker version of both my client
133
00:09:40,350 --> 00:09:42,470
and the server running in the background.
134
00:09:42,840 --> 00:09:45,810
But over here I can do docker-machine ls
135
00:09:48,620 --> 00:09:51,890
and I can do Docker version.
136
00:09:52,430 --> 00:09:59,420
But you'll notice that it says it can't connect to server and that's a common problem on Windows or
137
00:09:59,690 --> 00:10:01,450
on the toolbox specifically.
138
00:10:01,550 --> 00:10:06,800
What that means is that Docker isn't actually running in Windows it's running in the VM.
139
00:10:06,800 --> 00:10:13,400
So my client, my little command line Docker right here, can't talk to that unless I tell it where to
140
00:10:13,400 --> 00:10:14,040
go.
141
00:10:14,210 --> 00:10:19,700
And that's one of the things this nice little GUI over here does, that I need to set up over here.
142
00:10:19,730 --> 00:10:22,010
And the way we do that is with Docker Machine.
143
00:10:22,190 --> 00:10:27,860
So if I just do a docker-machine ls again, you see that has the one machine there, If I do a
144
00:10:27,890 --> 00:10:31,530
docker-machine help, I get lots of help.
145
00:10:31,610 --> 00:10:33,490
Get lots of information.
146
00:10:33,680 --> 00:10:39,980
And one of the things I can do here is I can type docker-machine env default, because remember that's
147
00:10:39,980 --> 00:10:42,430
the name of the default machine.
148
00:10:43,460 --> 00:10:49,130
And that will actually get me some variables that I can then copy and paste
149
00:10:52,420 --> 00:10:53,610
into my host.
150
00:10:53,620 --> 00:11:01,780
But it actually tells me down here at the bottom that if I just do this it should work.
151
00:11:01,780 --> 00:11:03,690
So let me copy and paste that.
152
00:11:04,000 --> 00:11:11,470
And now what should happen if I do a docker version, I get back both the client and the server.
153
00:11:11,680 --> 00:11:16,840
Now if you're savvy enough with cmder, you can actually have it do that stuff automatically on startup.
154
00:11:16,840 --> 00:11:18,180
I'll leave that to you.
155
00:11:18,310 --> 00:11:24,600
Otherwise just know that you can use the docker-machine env default to get the commands you need in order
156
00:11:24,600 --> 00:11:30,910
to tell Docker how to find the server. Then once it can find it you can do all the Docker commands
157
00:11:30,910 --> 00:11:32,860
that come in to later lectures.
158
00:11:34,450 --> 00:11:40,270
In this lecture you learned how to get the Docker ToolBox on older versions of Windows.
159
00:11:40,360 --> 00:11:44,560
I just want to give you a couple extra tips and summarize some of the things we talked about real
160
00:11:44,560 --> 00:11:45,140
quick.
161
00:11:45,250 --> 00:11:48,230
The Docker QuickStart Terminal is how you start it.
162
00:11:48,250 --> 00:11:49,690
Remember you need to run that once
163
00:11:49,690 --> 00:11:55,600
in order for it to automatically create the default machine and get everything set up. You can still actually
164
00:11:55,600 --> 00:12:01,400
use Docker Machine after that to manipulate that Docker machine in the background.
165
00:12:01,600 --> 00:12:05,680
But that actually defaults to the Bash shell and creates everything for you.
166
00:12:05,740 --> 00:12:11,050
Do note that during this course we're going to talk about something called a Bind Mount. That's where
167
00:12:11,290 --> 00:12:18,390
it connects source files that you've downloaded on your Windows machine into the Docker Linux machine.
168
00:12:18,400 --> 00:12:18,860
OK.
169
00:12:18,880 --> 00:12:23,440
And that's known as a Bind Mount. That actually works with the ToolBox, but it's only going to work for
170
00:12:23,440 --> 00:12:26,470
code that you stored inside the user's directory.
171
00:12:26,500 --> 00:12:33,400
So make sure that whenever you get downloads of code, you actually make sure
172
00:12:33,400 --> 00:12:37,310
they're in your user profile, and not somewhere else on a different drive letter.
173
00:12:37,360 --> 00:12:42,130
Unfortunately different drive letters and different paths will not work with the ToolBox. They have
174
00:12:42,130 --> 00:12:44,340
to be in your user profile.
175
00:12:44,350 --> 00:12:51,190
This also is a good thing that you don't use for databases. So I don't recommend that you do a bind mount -
176
00:12:51,190 --> 00:12:56,500
and again we'll explain the details of that later - but that you do a bind mount for databases it's really
177
00:12:56,500 --> 00:13:02,350
just for code. Because Windows file systems are quite different than Linux file systems and they don't
178
00:13:02,350 --> 00:13:07,110
always work well together when they're sharing.
179
00:13:07,130 --> 00:13:12,290
And again remember that you can always use docker-machine to actually recreate that Linux VM that it created
180
00:13:12,290 --> 00:13:12,710
for you.
181
00:13:12,710 --> 00:13:14,170
The default one.
182
00:13:14,270 --> 00:13:21,620
Or additional ones. The great editor that I recommend is Visual Studio Code in this course.
183
00:13:21,680 --> 00:13:26,990
If you would like a shell replacement, you might want to consider cmder.net and you can get that at
184
00:13:26,990 --> 00:13:28,060
cmder.net.
19326
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.