Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:06,220 --> 00:00:08,332
Now, we're going to actually get into the real install.
2
00:00:08,333 --> 00:00:10,119
First, we're going to download
3
00:00:10,120 --> 00:00:12,849
and install Docker. We're going to tweak some of the
settings of it,
4
00:00:12,850 --> 00:00:14,170
or check them out at least.
5
00:00:14,230 --> 00:00:16,590
Then, we're going to go clone my repo.
6
00:00:16,690 --> 00:00:18,010
We're going to get an editor,
7
00:00:18,220 --> 00:00:19,590
in case you don't have a code editor.
8
00:00:19,660 --> 00:00:22,209
Then, we are checking out a few options.
9
00:00:22,210 --> 00:00:24,213
If you want to tweak your terminal in your shell setup,
10
00:00:24,214 --> 00:00:25,479
we can get to that,
11
00:00:25,480 --> 00:00:25,882
too. Here's
12
00:00:29,920 --> 00:00:32,540
my plain, old Windows 10 pro machine.
13
00:00:32,650 --> 00:00:34,580
The first thing we're going do is we're going to go to
store.docker.com.
14
00:00:39,440 --> 00:00:43,020
I'm going to click on Docker CE here in the middle.
15
00:00:44,110 --> 00:00:47,379
Then Docker Community
16
00:00:47,380 --> 00:00:49,050
Edition for Windows.
17
00:00:49,510 --> 00:00:51,159
In here, you'll notice that, by default,
18
00:00:51,160 --> 00:00:54,060
when I click the get Docker, it's going to download the
19
00:00:54,130 --> 00:00:55,539
Docker for Windows.
20
00:00:55,540 --> 00:00:57,530
It says this requires Windows 10 Professional.
21
00:00:57,760 --> 00:01:00,309
If I had an older version of Windows that we'll show in a
few minutes,
22
00:01:00,310 --> 00:01:01,830
I would click on the Docker toolbox.
23
00:01:02,170 --> 00:01:03,284
But here, I'm going to say get docker
24
00:01:05,060 --> 00:01:06,610
and by default, by the way,
25
00:01:06,650 --> 00:01:08,573
this is installing the Stable edition,
26
00:01:08,840 --> 00:01:10,759
not the Edge. If I wanted Edge,
27
00:01:10,760 --> 00:01:12,460
I could scroll down a little farther
28
00:01:12,470 --> 00:01:14,020
and I could choose Edge,
29
00:01:14,270 --> 00:01:16,609
or if I was actually on the server version,
30
00:01:16,610 --> 00:01:18,580
I could actually do the Edge there as well.
31
00:01:19,690 --> 00:01:20,800
Let's save this.
32
00:01:21,360 --> 00:01:23,099
I personally save it, before I run it,
33
00:01:23,100 --> 00:01:25,020
because it seems to work better that way.
34
00:01:25,590 --> 00:01:26,960
Then we're going to run the install.
35
00:01:27,150 --> 00:01:29,790
And the install is pretty typical for Windows.
36
00:01:30,060 --> 00:01:32,480
It's going to ask me if it's okay.
37
00:01:34,840 --> 00:01:35,551
Now that it's installed, you'll notice
38
00:01:37,870 --> 00:01:38,629
it's not running.
39
00:01:38,630 --> 00:01:41,209
I would see a little Moby icon down there.
40
00:01:41,210 --> 00:01:42,580
Let me actually run it.
41
00:01:44,180 --> 00:01:45,318
It's going to ask me about Hyper-V.
42
00:01:45,980 --> 00:01:48,880
If you don't have Hyper-V installed on your machine,
43
00:01:49,190 --> 00:01:51,400
then this will actually enable it
44
00:01:51,650 --> 00:01:52,840
and reboot.
45
00:01:53,390 --> 00:01:55,039
That means you have to have local admin.
46
00:01:55,040 --> 00:01:57,310
I mean you had to have local admin to install this thing.
47
00:01:57,470 --> 00:02:00,158
You are going to have to have local admin for Hyper-V.
48
00:02:00,530 --> 00:02:02,149
If you're on a laptop
49
00:02:02,150 --> 00:02:05,035
or desktop that you've never done virtualization on,
50
00:02:05,730 --> 00:02:08,181
there's a rare case that you may need to go in the BIOS
51
00:02:09,139 --> 00:02:12,440
and actually enable the virtualization features in the
BIOS.
52
00:02:13,070 --> 00:02:14,719
That's well documented on the internet.
53
00:02:14,720 --> 00:02:16,090
If you have an error,
54
00:02:16,550 --> 00:02:18,800
I recommend just looking the
55
00:02:19,670 --> 00:02:22,609
error up on the Internet and you'll probably will find that
everyone's saying,
56
00:02:22,610 --> 00:02:23,712
Oh yeah. Go in your BIOS
57
00:02:23,900 --> 00:02:26,685
and find the extensions and install the vtx
58
00:02:27,110 --> 00:02:29,090
extension, or whatever it is in the BIOS.
59
00:02:29,270 --> 00:02:32,329
You're not actually installing it. You're actually just
enabling
60
00:02:32,330 --> 00:02:34,330
it. But, that's a rare case.
61
00:02:34,970 --> 00:02:37,780
Most of the time, people that have problems installing,
62
00:02:37,970 --> 00:02:41,500
it's either because they're on a home edition,
63
00:02:41,930 --> 00:02:43,369
but they forgot to check
64
00:02:43,370 --> 00:02:46,630
and they thought they had pro, so they try to install the
pro version.
65
00:02:46,970 --> 00:02:50,269
Or, maybe they're running an older
66
00:02:50,270 --> 00:02:52,960
version of Windows 10 that doesn't have the latest updates.
67
00:02:53,750 --> 00:02:56,959
It is important that you keep your Windows machine up to
date for Docker
68
00:02:56,960 --> 00:02:59,959
because Windows is updating their stuff as rapidly
69
00:02:59,960 --> 00:03:02,500
as Docker is updating theirs, and they're both related.
70
00:03:02,650 --> 00:03:03,970
So, you definitely want to keep those.
71
00:03:04,460 --> 00:03:06,679
You can actually now see on my machine, I've rebooted
72
00:03:06,680 --> 00:03:09,550
and Docker is starting in this little icon down the bottom.
73
00:03:10,510 --> 00:03:12,630
Once it's booted, then I'll see this little prompt.
74
00:03:13,000 --> 00:03:15,565
I can run my PowerShell
75
00:03:16,630 --> 00:03:18,099
as me, not as admin,
76
00:03:18,100 --> 00:03:21,030
but just as me, and I can do a docker version.
77
00:03:21,910 --> 00:03:23,580
I should see it running.
78
00:03:23,830 --> 00:03:25,489
This is the version I have installed.
79
00:03:25,490 --> 00:03:27,410
This is the latest, Stable version.
80
00:03:27,580 --> 00:03:29,700
In case you were so inclined,
81
00:03:30,010 --> 00:03:31,627
in the background, this is running Hyper-V,
82
00:03:32,080 --> 00:03:34,830
so I can run the Hyper-V desktop app.
83
00:03:36,280 --> 00:03:37,879
I can actually see,
84
00:03:37,880 --> 00:03:41,049
on my Desktop, that this is running in something called a
85
00:03:41,050 --> 00:03:42,420
Moby linux VM.
86
00:03:43,090 --> 00:03:45,853
It's got 2GB of RAM installed.
87
00:03:46,030 --> 00:03:48,770
It's uptime is just a minute because it just started.
88
00:03:49,030 --> 00:03:51,630
Real quick, let's just go into the settings.
89
00:03:51,820 --> 00:03:54,159
Right click on that little icon down there,
90
00:03:54,160 --> 00:03:55,770
and we'll go up here to settings.
91
00:03:56,230 --> 00:03:58,120
There's a couple that you need to care about.
92
00:03:59,090 --> 00:04:02,239
If you store your code that you might
93
00:04:02,240 --> 00:04:04,600
use in this course on a different drive,
94
00:04:04,730 --> 00:04:06,480
you're going to need to check that here.
95
00:04:06,900 --> 00:04:08,248
I definitely am going to check C,
96
00:04:08,420 --> 00:04:09,696
because that's where I keep a lot of my code.
97
00:04:09,697 --> 00:04:12,769
I need to enable wherever I'm going
98
00:04:12,770 --> 00:04:16,069
to have code running inside a container.
99
00:04:16,070 --> 00:04:17,358
You'll see more about that later. But,
100
00:04:17,360 --> 00:04:18,428
you've got to do that here.
101
00:04:18,709 --> 00:04:20,629
And the other thing is you might, if you want,
102
00:04:20,630 --> 00:04:23,380
if you have enough resources, you can always bump up the
memory
103
00:04:23,390 --> 00:04:23,780
or the CPUs.
104
00:04:24,980 --> 00:04:26,243
I think it comes pretty cool out-of-the-box.
105
00:04:26,720 --> 00:04:29,590
I mean 2GB and two CPUs is a pretty good amount.
106
00:04:29,810 --> 00:04:31,819
But, if you start hitting it's limits
107
00:04:31,820 --> 00:04:33,190
and it starts to get slow,
108
00:04:33,230 --> 00:04:35,440
you can always bump those up, depending on your hardware,
109
00:04:35,540 --> 00:04:36,978
right. The rest of these options,
110
00:04:37,460 --> 00:04:39,300
you're kind of going to leave the same, probably.
111
00:04:39,390 --> 00:04:42,370
You're not going to have to mess with those too much in
this course.
112
00:04:42,530 --> 00:04:45,100
But, when I apply these settings,
113
00:04:46,340 --> 00:04:48,640
it will require restarting of Docker.
114
00:04:49,860 --> 00:04:53,060
While that's happening, let's go clone my repo.
115
00:04:53,410 --> 00:04:56,699
Remember, that this is in the resource lecture earlier
116
00:04:56,700 --> 00:04:59,720
in this section. I'm going to clone this,
117
00:05:00,110 --> 00:05:01,820
but I want to clone it in Desktop.
118
00:05:02,190 --> 00:05:03,950
If you've never used GitHub before,
119
00:05:04,140 --> 00:05:05,696
then you can use a GUI.
120
00:05:06,080 --> 00:05:08,396
That's probably one of the easiest ways if you're not used
to GitHub.
121
00:05:08,520 --> 00:05:10,730
If you know GitHub, then you've got your own way to do it.
122
00:05:10,860 --> 00:05:14,480
But, here what I can do is I can actually use the
123
00:05:15,210 --> 00:05:16,949
GitHub GUI to download
124
00:05:16,950 --> 00:05:19,280
and clone my repo.
125
00:05:19,380 --> 00:05:21,110
So, I'm going to install that.
126
00:05:22,020 --> 00:05:25,490
All right. Then, I'm actually going to put all of my code
127
00:05:25,530 --> 00:05:28,389
in a directory called code.
128
00:05:28,390 --> 00:05:29,950
I'm going to make a directory.
129
00:05:32,230 --> 00:05:35,329
You'll see on my machine, that I actually put all of my
software
130
00:05:35,330 --> 00:05:38,650
code inside a directory called code underneath my user.
131
00:05:38,810 --> 00:05:41,326
So, that's where I'm going to clone this from GitHub.
132
00:05:41,810 --> 00:05:44,290
If you remember earlier, I just changed the settings,
133
00:05:44,360 --> 00:05:47,329
so that the C drive could be where I
134
00:05:47,330 --> 00:05:49,192
store some code that Docker can see.
135
00:05:50,010 --> 00:05:51,580
I'm just going to log in as me.
136
00:05:52,850 --> 00:05:55,240
Now that I have GitHub installed,
137
00:05:55,310 --> 00:05:57,670
one of the ways I can clone it is
138
00:05:58,370 --> 00:05:59,839
from the website.
139
00:05:59,840 --> 00:06:01,046
I can copy the URL,
140
00:06:02,210 --> 00:06:03,659
and then go back over to Desktop and say,
141
00:06:03,660 --> 00:06:05,120
clone repository,
142
00:06:05,340 --> 00:06:06,173
copy that in.
143
00:06:06,810 --> 00:06:10,169
Then, remember that this is not going to be under
Documents.
144
00:06:10,170 --> 00:06:11,519
It's going to be under code.
145
00:06:11,520 --> 00:06:12,586
That's where I put my stuff.
146
00:06:13,740 --> 00:06:14,777
So clone.
147
00:06:16,380 --> 00:06:17,729
Now, the advantage of doing it this way,
148
00:06:17,730 --> 00:06:19,310
instead of downloading the zip,
149
00:06:19,440 --> 00:06:21,389
is that you can come in here and update it,
150
00:06:21,390 --> 00:06:24,509
because I do update this repo when there's
151
00:06:24,510 --> 00:06:26,339
fixes or changes in Docker,
152
00:06:26,340 --> 00:06:29,390
which happens pretty much every month.
153
00:06:29,760 --> 00:06:31,769
Now, if I do a dir in here,
154
00:06:31,770 --> 00:06:34,804
you can see that I'm in the Docker Udemy Docker Mastery
155
00:06:35,310 --> 00:06:37,400
directory, and there we go.
156
00:06:39,220 --> 00:06:41,749
If you're not savvy on code editors,
157
00:06:41,750 --> 00:06:45,290
a little tip here is the best one I like for Docker editing
158
00:06:45,480 --> 00:06:46,940
is Visual Studio Code.
159
00:06:47,240 --> 00:06:49,012
I can...you can just search vs code,
160
00:06:51,450 --> 00:06:54,080
and you'll get the website coming right up.
161
00:06:54,240 --> 00:06:56,150
Then, you can download it,
162
00:06:56,760 --> 00:06:59,390
and install it, just like a regular Windows app,
163
00:06:59,610 --> 00:07:01,250
and it works quite well.
164
00:07:01,290 --> 00:07:04,700
One of the best parts about this editor is that it has a
built-in
165
00:07:04,800 --> 00:07:06,080
Docker syntax.
166
00:07:06,980 --> 00:07:10,009
So, it'll let me open up Docker
167
00:07:10,010 --> 00:07:11,692
compose files and Dockerfiles,
168
00:07:11,970 --> 00:07:13,330
as you'll learn in this course,
169
00:07:13,610 --> 00:07:15,940
and it will highlight the code in them
170
00:07:16,100 --> 00:07:19,729
and give me actual little hints about how to
171
00:07:19,730 --> 00:07:20,410
use it.
172
00:07:22,390 --> 00:07:25,792
The other option is if you want to replace this window,
173
00:07:25,840 --> 00:07:28,959
right. So, this PowerShell window is a
174
00:07:28,960 --> 00:07:32,049
terminal emulator. Not the same as the shell that's inside
it because
175
00:07:32,050 --> 00:07:34,710
we still have to use the PowerShell shell,
176
00:07:34,920 --> 00:07:37,720
but what we can use is a different GUI
177
00:07:38,140 --> 00:07:40,650
for that shell. And that might be
178
00:07:41,440 --> 00:07:42,045
commander.net.
179
00:07:43,930 --> 00:07:46,920
And Commander is basically
180
00:07:46,960 --> 00:07:50,049
a console emulator that gives you
181
00:07:50,050 --> 00:07:51,999
a huge amount of features,
182
00:07:52,000 --> 00:07:53,739
for free, open source,
183
00:07:53,740 --> 00:07:56,559
out-of-the-box. The way I install it,
184
00:07:56,560 --> 00:07:57,900
is I just download it.
185
00:07:58,090 --> 00:07:59,340
It's a zip file.
186
00:07:59,620 --> 00:08:02,769
I actually make sure that,
187
00:08:02,770 --> 00:08:04,230
by the way, when you do this,
188
00:08:04,510 --> 00:08:06,189
you right click,
189
00:08:06,190 --> 00:08:07,650
go to properties,
190
00:08:08,080 --> 00:08:11,129
and unblock so
191
00:08:11,130 --> 00:08:12,650
that you can actually unzip it.
192
00:08:13,590 --> 00:08:16,130
Then it works. It doesn't complain to you.
193
00:08:16,920 --> 00:08:19,479
All right. Now then I've extracted the Commander,
194
00:08:19,480 --> 00:08:22,439
I'm just going in here and I'm going to drag the
195
00:08:22,440 --> 00:08:24,999
Commander button down here.
196
00:08:25,000 --> 00:08:27,260
The commander.exe is actually what that is.
197
00:08:27,330 --> 00:08:30,509
I'm just going to drag that down to my Start Menu,
198
00:08:30,510 --> 00:08:32,240
or my taskbar rather,
199
00:08:32,370 --> 00:08:33,989
and that way I can launch it from here.
200
00:08:33,990 --> 00:08:35,568
The first time, it's going to do some stuff.
201
00:08:35,570 --> 00:08:36,979
It's going to set up some things.
202
00:08:37,350 --> 00:08:39,765
Notice that it's actually got a tab down here.
203
00:08:40,620 --> 00:08:42,289
I can create more tabs.
204
00:08:42,630 --> 00:08:44,540
I can do that over here.
205
00:08:44,670 --> 00:08:47,510
This little drop-down menu, there's actually several of
them here.
206
00:08:47,670 --> 00:08:50,601
This one allows me to decide what my next tab is
207
00:08:50,730 --> 00:08:52,589
going to run as. Is it going to run Bash?
208
00:08:52,590 --> 00:08:54,995
Is it going to run PowerShell? Or is it going to run the
command prompt?
209
00:08:55,110 --> 00:08:58,209
Well, remember I told you earlier we need to run this
210
00:08:58,210 --> 00:09:01,860
as PowerShell. We're going to be in here
211
00:09:02,610 --> 00:09:05,669
and then we're going to type in docker
212
00:09:05,670 --> 00:09:06,020
ps.
213
00:09:07,440 --> 00:09:10,442
Away we go. docker info works.
214
00:09:10,680 --> 00:09:12,209
you'll learn about these commands in a minute.
215
00:09:12,210 --> 00:09:13,798
The point is, it kind of just works,
216
00:09:13,830 --> 00:09:16,078
out-of-the-box. It's a neat option,
217
00:09:16,079 --> 00:09:18,930
and I tend to run it whenever I'm using Windows.
16850
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.