All language subtitles for 007 Docker for Linux Setup and Tips_en

af Afrikaans
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
tl Filipino
fi Finnish
fr French
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian Download
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:05,580 --> 00:00:11,850 Are you using Linux as your main operating system on your laptop or desktop? Or maybe you just want 2 00:00:11,850 --> 00:00:16,460 to install Docker and use it on a Linux server in the cloud or in a Linux VM? 3 00:00:16,530 --> 00:00:18,060 Then this is the video for you. 4 00:00:18,210 --> 00:00:22,860 We're going to go through all the Linux features that you need to make sure are set up correctly so 5 00:00:22,860 --> 00:00:27,700 that you can get through this course. And do all of the examples and code stuff. 6 00:00:27,960 --> 00:00:31,980 So first off, congratulations! If you're going to use Linux, 7 00:00:31,980 --> 00:00:36,200 it's actually the easiest to get started with Docker. Docker was made for Linux. 8 00:00:36,210 --> 00:00:39,690 It now actually has Docker Containers for Windows. 9 00:00:39,690 --> 00:00:41,480 But we're going to get to that later in the course. 10 00:00:41,490 --> 00:00:44,920 But most of this course is all about containers on Linux. 11 00:00:44,940 --> 00:00:51,030 And so when you think of the Mac and the Windows stuff, it's mostly them actually running a tiny little 12 00:00:51,030 --> 00:00:56,340 Linux VM in the background. For you, if you're going to be running natively on Linux, you're good 13 00:00:56,340 --> 00:00:56,790 to go. 14 00:00:56,790 --> 00:01:01,260 There is no emulation or little VM running in the background; it just runs straight on your operating 15 00:01:01,260 --> 00:01:01,950 system. 16 00:01:02,190 --> 00:01:08,240 So there's 3 main ways to get Docker on Linux and it might not be what you expect. 17 00:01:08,430 --> 00:01:12,990 The first one is through a script that's actually using a cURL script. 18 00:01:12,990 --> 00:01:19,260 It's actually my preferred way. Especially when I'm installing it from just for testing or playing around 19 00:01:19,260 --> 00:01:26,520 with it, because it does use the Edge releases, which are not the Stable sort of production-y version. 20 00:01:26,730 --> 00:01:29,360 They're more of the beta monthly releases. 21 00:01:29,430 --> 00:01:34,560 So obviously you don't want to do that for maybe a production system where you want to automate over 22 00:01:34,560 --> 00:01:41,250 and over again for creating servers in the cloud or your data center. But for installing locally, I highly 23 00:01:41,250 --> 00:01:42,840 recommend just using Edge. 24 00:01:42,890 --> 00:01:44,540 It's actually quite Stable for being beta. 25 00:01:44,540 --> 00:01:49,110 I usually don't have any issues with it and but it allows you to test out features quicker because it 26 00:01:49,110 --> 00:01:50,430 comes out monthly. 27 00:01:50,520 --> 00:01:52,430 So that script would actually get you installed. 28 00:01:52,440 --> 00:01:54,150 And we're going to be using that script today. 29 00:01:55,420 --> 00:02:02,050 I'm also going to show you though about the store, which has specific instructions for each distribution. 30 00:02:02,050 --> 00:02:10,300 So whether you're on Ubuntu or Debian or Red Hat or CentOS, or just like all of the different distributions 31 00:02:10,560 --> 00:02:10,889 there. 32 00:02:11,050 --> 00:02:20,320 They largely come down to Debian-based distributions or Fedora- and Red Hat-based distributions and the 33 00:02:20,320 --> 00:02:23,400 YUM package manager and the APT Package Manager right. 34 00:02:23,410 --> 00:02:28,750 So there are other variants and other things out there but, really in this course, for Linux, we're really 35 00:02:28,750 --> 00:02:36,070 just mostly talking about those two because they cover 95% of the use cases in Linux. You 36 00:02:36,070 --> 00:02:42,160 need to go to the store to get the specific instructions for your distribution. Because you'll learn 37 00:02:42,160 --> 00:02:47,610 that you shouldn't be using the built-in default one that might come with your package manager. 38 00:02:47,620 --> 00:02:49,120 We'll talk about that in a second. 39 00:02:49,360 --> 00:02:56,680 I want to note real quick though, if you're on Red Hat Enterprise Linux -- or RHEL, as I'll call it from 40 00:02:56,680 --> 00:03:03,760 now on -- that only really officially supports Docker Enterprise Edition, which is the paid version. 41 00:03:03,880 --> 00:03:11,510 Docker's attitude really is, a paid operating system gets a paid version of Docker. A free operating system. 42 00:03:11,530 --> 00:03:13,750 gets a free version of Docker. 43 00:03:13,840 --> 00:03:16,420 Now we're talking about the native stuff like Linux, right. 44 00:03:16,430 --> 00:03:24,070 In this case, if you're going to be on Red Hat, you can actually go to the store and look up the CentOS 45 00:03:24,100 --> 00:03:31,990 version because it's also a YUM package manager version and you can do that Docker CE instead of having 46 00:03:31,990 --> 00:03:33,760 to go pay for Docker EE. 47 00:03:33,970 --> 00:03:38,350 But I just want to tell you that now because if you go to the store and then you go to click on Docker CE, 48 00:03:39,100 --> 00:03:42,190 and then you go look for Red Hat Enterprise Linux, 49 00:03:42,190 --> 00:03:45,660 it's not going to be there because it's over on the EE side. 50 00:03:45,700 --> 00:03:51,580 Docker assumes if you're running the paid RHEL, that you would actually be paying for Docker support just 51 00:03:51,580 --> 00:03:53,330 like you pay for your Linux support. 52 00:03:53,350 --> 00:04:00,710 So next up you can install this on any Linux option, whether that's the native computer on your laptop 53 00:04:00,710 --> 00:04:03,860 or desktop with a GUI or it's a server in the cloud. 54 00:04:03,860 --> 00:04:09,260 All these processes are the same and we will, if there's ever an exception, I will mention at that time. 55 00:04:11,150 --> 00:04:16,790 This is not going to work for all distributions. Remember how I said 95 is really 95% is really what 56 00:04:16,790 --> 00:04:17,480 we're going for. 57 00:04:17,480 --> 00:04:22,460 So that's just an estimate of my experience with the people I work with, I have no scientific background 58 00:04:22,460 --> 00:04:24,010 on that 95%. 59 00:04:24,020 --> 00:04:30,410 But, there are distributions out there that may not work or will not work with Docker. Specifically 60 00:04:30,410 --> 00:04:38,240 those are the less common or vendor-specific distributions like Amazon Linux or Linode Linux or 61 00:04:38,240 --> 00:04:44,510 a few other ones out there maybe like Google Cloud Linux, which I know is still beta testing Docker 62 00:04:44,510 --> 00:04:45,250 support. 63 00:04:45,350 --> 00:04:51,260 So Docker is a leading-edge technology that uses the OS kernel and specific features in that kernel. 64 00:04:51,530 --> 00:04:57,980 Those particular kernels, at least in the past, have not had all the features in them that Docker needs 65 00:04:57,980 --> 00:04:59,230 to work properly. 66 00:04:59,240 --> 00:05:04,520 So just for this course a lot of my stuff is going to be on my demonstrations and stuff are going to 67 00:05:04,520 --> 00:05:07,440 be on a Ubuntu or Debian variant. 68 00:05:07,670 --> 00:05:10,290 And actually in this one we're going to use Mint here in a minute. 69 00:05:10,700 --> 00:05:14,620 And lastly don't use the pre-installed setups. 70 00:05:14,630 --> 00:05:20,330 This is generally my recommendation because Docker moves really fast, and you want the latest version 71 00:05:20,330 --> 00:05:23,700 of Docker, even if you're doing production you want the latest production version. 72 00:05:23,690 --> 00:05:24,870 When you start out. 73 00:05:25,070 --> 00:05:32,750 If you go to Digital Ocean or AWS or Linode, you might find a Linux install that's 74 00:05:32,900 --> 00:05:37,010 maybe an easier built in package thing that just says hey we've already got Docker installed for 75 00:05:37,010 --> 00:05:37,700 you. 76 00:05:37,700 --> 00:05:41,780 Generally I don't recommend using those because you're usually going to get an old version. You're going to 77 00:05:41,940 --> 00:05:45,380 get an old version of Docker, and then the first thing you're going to have to do is figure out how to 78 00:05:45,380 --> 00:05:46,170 update it. 79 00:05:46,310 --> 00:05:51,290 And depending on how they installed Docker, it may not be that easy to figure out how to update it to the 80 00:05:51,290 --> 00:05:52,240 latest edition. 81 00:05:52,280 --> 00:05:58,940 So I always recommend using like the official Ubuntu or the official Fedora or the official CentOS installs 82 00:05:59,330 --> 00:06:03,300 then manually installing Docker as we will in a minute. 83 00:06:03,470 --> 00:06:07,330 In general this is going to actually go through a couple of basic steps. 84 00:06:07,430 --> 00:06:13,550 We're going to first update our package manager and install Docker. Then we're going to optionally add 85 00:06:13,550 --> 00:06:18,890 your user account to the Docker group and that will prevent you from having to use Sudo every single 86 00:06:18,890 --> 00:06:23,870 time you want to run a Docker command, because that can add a little bit of time and tediousness to 87 00:06:23,870 --> 00:06:24,370 it. 88 00:06:24,380 --> 00:06:28,580 So we're going to do that. Then we're going to go and we're going to clone my repo from GitHub onto 89 00:06:28,580 --> 00:06:33,840 your Linux machine and then we can talk about getting a code editor if you don't have one. 90 00:06:34,100 --> 00:06:38,870 And lastly we're going to tweak your terminal and shell set up. 91 00:06:38,900 --> 00:06:44,930 This is a very optional approach but I get a lot of questions in the course from people saying "hey you're 92 00:06:44,930 --> 00:06:47,750 terminal or your shell did this or looked like this." 93 00:06:47,750 --> 00:06:48,590 "How do you do that?" 94 00:06:48,590 --> 00:06:55,310 So I'm trying to give some information around paths you can go down to maybe tweak and set up your shell 95 00:06:55,310 --> 00:07:00,740 differently so that it looks more like the one that I use which I use every day and I customize it constantly 96 00:07:00,740 --> 00:07:02,580 because I'm trying to optimize it. 97 00:07:02,600 --> 00:07:06,290 You don't have to do any of that if you don't want to but I want to give you some tips on that. 98 00:07:09,400 --> 00:07:19,030 OK so what I have here is a Mint Linux stock, out-of-the-box machine. Mint Linux is a variant of Ubuntu. 99 00:07:19,030 --> 00:07:23,170 So in case you're curious, it's actually a really great desktop version of Linux, but I'm sure at this 100 00:07:23,170 --> 00:07:27,550 point you are using your own Linux and you have all the things you want on it. 101 00:07:27,550 --> 00:07:30,340 And so I don't need to tell you about the one that I tend to like. 102 00:07:30,400 --> 00:07:38,080 So if I just type Docker in this scenario it actually says hey it's not installed you can use APT to 103 00:07:38,080 --> 00:07:41,240 install it and you install with docker.io. 104 00:07:41,260 --> 00:07:46,270 The problem with that is you're going to get an old version maybe even a year old, which, 105 00:07:46,330 --> 00:07:51,090 that's at least 4 major versions, if not 12 Edge, 106 00:07:51,250 --> 00:07:56,930 minor versions old, so you don't want that you actually want to install it through the store. 107 00:07:57,280 --> 00:08:01,900 We're going to actually use a script like I mentioned a while ago, but before we do that, I just 108 00:08:01,900 --> 00:08:05,560 want to show you what it looks like if I go into Docker CE. 109 00:08:05,650 --> 00:08:12,190 I know that basically my Mint is actually just a variant of Ubuntu so I can scroll down and find the 110 00:08:12,190 --> 00:08:13,080 Ubuntu one. 111 00:08:16,250 --> 00:08:22,220 It actually will step through instructions that tell you which additions and I know mine is based 112 00:08:22,220 --> 00:08:25,010 on 16.04; 113 00:08:25,370 --> 00:08:31,580 so I click on the Usage Instructions in the top right. And it actually walks me through it and actually 114 00:08:31,580 --> 00:08:39,210 tells me hey you can use make sure these versions and go get the Docker for 115 00:08:39,240 --> 00:08:45,920 Ubunto from the Docker documentation website; which, is a very detailed, stepping you through, making 116 00:08:45,920 --> 00:08:52,130 sure that you don't have the old version installed from the default apt-get repository, and how to 117 00:08:52,130 --> 00:08:53,840 go through each step by step. 118 00:08:53,840 --> 00:09:00,210 However, there is sort of a cheat for this. In our case, we want to install the Edge release. 119 00:09:00,260 --> 00:09:09,120 I'm just going to go to get.docker.com; and, it's actually going to show me a script, which I can use 120 00:09:09,120 --> 00:09:14,760 with cURL over https, so that we're making sure that it's officially the script from Docker, because it's encrypted 121 00:09:14,760 --> 00:09:21,780 on the connection. It will let me install through an automated way; it'll basically figure out what 122 00:09:21,780 --> 00:09:27,930 is my operating system, what is my kernel, how do I do I use APT package or YUM package and it will 123 00:09:27,930 --> 00:09:30,940 figure all that stuff out and basically install everything I need. 124 00:09:31,020 --> 00:09:36,450 So I tend to use this because it works so well for local installs. 125 00:09:37,260 --> 00:09:43,800 What I'm going to do is I'm going to copy this, and paste it into my terminal and it's going to download 126 00:09:43,800 --> 00:09:53,240 the script. And it's telling me just to run the shell, so I put in my admin sudo password, and away we go. 127 00:09:53,700 --> 00:10:00,480 And you notice while this is installing, that the actual package is docker-ce. Over the last few 128 00:10:00,480 --> 00:10:07,020 years, as Docker has changed their branding and their versioning and also their packaging formats, the 129 00:10:07,050 --> 00:10:10,860 name of the actual package that you would install has changed. 130 00:10:10,890 --> 00:10:14,420 The one that it actually installed in the background is called docker-ce, 131 00:10:14,440 --> 00:10:15,890 in case you're curious. 132 00:10:15,930 --> 00:10:16,260 OK. 133 00:10:16,260 --> 00:10:20,970 And it's actually telling us at the end of the install, that if we would like for our user account to 134 00:10:20,970 --> 00:10:28,980 be able to just run Docker commands without having to type sudo or go in his actual root, then we can do 135 00:10:28,980 --> 00:10:36,880 this particular command, where we're just adding our user account to the Docker group on our system. 136 00:10:36,880 --> 00:10:41,370 Then I'm going to need to log out, and back in, in order for that change to take effect. 137 00:10:41,380 --> 00:10:47,980 So instead of doing that, I just want to test to make sure that Docker's working and running, and I can 138 00:10:47,980 --> 00:10:54,430 do sudo docker version. OK great. I'll actually log out and log back in in a minute. 139 00:10:54,460 --> 00:10:56,360 So you don't have to do that part 140 00:10:56,410 --> 00:11:03,730 if you're concerned about security. Here's why. Docker requires root in order to do the things it 141 00:11:03,730 --> 00:11:09,760 needs to do with the core functionality of Linux. Those things are something around name spaces and 142 00:11:09,760 --> 00:11:15,340 there's this thing called cgroups and other features of Linux that it needs to use. So it needs root 143 00:11:15,340 --> 00:11:15,970 for that. 144 00:11:15,970 --> 00:11:16,720 Right. 145 00:11:16,720 --> 00:11:21,260 So when you, by default, when you do things it's going to need to use sudo. 146 00:11:21,280 --> 00:11:27,570 But if you add your user to the Docker group, what you're effectively doing is giving that user, 147 00:11:27,640 --> 00:11:36,580 in this case Bret, the ability to actually run a Docker container later that could then have root permissions 148 00:11:36,580 --> 00:11:37,250 on the host. 149 00:11:37,270 --> 00:11:44,110 Now this is a subtle little nuance of security that you don't necessarily have to worry about if it's 150 00:11:44,110 --> 00:11:45,490 just your local machine. 151 00:11:45,730 --> 00:11:52,000 But there are some variants of Linux that have taken a hard stance on this and that includes all the 152 00:11:52,000 --> 00:11:52,540 Red Hat. 153 00:11:52,540 --> 00:11:59,770 So the CentOS and the Red Hat Enterprise Linux and maybe the Fedora will not work with this Docker option. 154 00:11:59,780 --> 00:12:06,670 You will have to either be root or used sudo for every command you use for Docker on those distributions 155 00:12:06,670 --> 00:12:07,060 of Linux unfortunately. 156 00:12:07,060 --> 00:12:12,490 Again, that's anything based on the Red Hat Enterprise Linux stuff and Fedora and that's 157 00:12:12,640 --> 00:12:15,820 Fedora, RHEL, and CentOS. 158 00:12:15,820 --> 00:12:19,530 There might be others but those are the ones I definitely know about that won't work with this. 159 00:12:19,540 --> 00:12:24,220 So in those cases, even if you add yourself to the Docker group, it will do nothing and you'll still have 160 00:12:24,220 --> 00:12:29,590 to type sudo. You'll know if it doesn't work, because if you just type Docker version it'll actually 161 00:12:29,590 --> 00:12:35,940 say hey I can't talk to the Linux daemon can you help me out. 162 00:12:35,950 --> 00:12:39,380 And that's because only root can talk to that socket. 163 00:12:39,390 --> 00:12:47,540 That's a hint that you need to be either admin, root rather, or be in a group that works. 164 00:12:47,620 --> 00:12:51,410 Notice if I do docker version again with the sudo it works. 165 00:12:51,770 --> 00:12:52,050 All right. 166 00:12:52,050 --> 00:12:57,010 Now that you have Docker installed, you're in need to other tools for this course from Docker. But when 167 00:12:57,010 --> 00:13:02,620 you're using Linux as your main operating system, they don't come bundled with the install. When you're 168 00:13:02,620 --> 00:13:04,630 on Mac or Windows, 169 00:13:04,630 --> 00:13:09,220 this is all managed for you, but on Linux we have to take things into our own hands a little bit. 170 00:13:09,220 --> 00:13:12,680 And those two tools are Docker Machine and Docker Compose. 171 00:13:12,940 --> 00:13:19,300 Each one is a single binary, and you can get them on Docker's website in the documentation area, not on 172 00:13:19,300 --> 00:13:20,040 the store. 173 00:13:20,080 --> 00:13:27,430 And so for the or machine part, I can find here instructions for Linux and I can just copy that and it 174 00:13:27,430 --> 00:13:29,360 should work on my machine. 175 00:13:35,580 --> 00:13:40,680 Ok and now I can type docker-machine version and make sure that I got the latest version and it works 176 00:13:41,160 --> 00:13:48,180 and I can do the same thing for Docker Compose... and find that on the documentation website as well. 177 00:13:48,180 --> 00:13:50,560 And scroll down to the Linux option. 178 00:13:50,640 --> 00:13:56,760 Now, we could actually copy this and install it from here, but I want to show you an alternative way that 179 00:13:56,790 --> 00:14:01,500 I actually prefer. The nice thing here is that the Docker website has lots of information about how 180 00:14:01,500 --> 00:14:02,160 to install it. 181 00:14:02,160 --> 00:14:03,500 What it does and what not. 182 00:14:03,630 --> 00:14:05,970 But these are all available on GitHub. 183 00:14:06,000 --> 00:14:14,610 I can go over to github.com/docker/compose and click on the Releases button, and 184 00:14:14,610 --> 00:14:19,180 this is where the official release as you can see the latest is 1.15.0. 185 00:14:19,410 --> 00:14:26,940 In this case, the documentation website is a little outdated with 1.14.0, then the releases on the 186 00:14:26,940 --> 00:14:28,190 compose an GitHub. 187 00:14:28,200 --> 00:14:35,070 So I just always remember to go check github.com/docker/compose/releases and I can 188 00:14:35,070 --> 00:14:39,990 do the same thing for machine. And right here, it gives me the information that I just need to cut and 189 00:14:39,990 --> 00:14:42,090 paste into my terminal. 190 00:14:42,330 --> 00:14:47,310 But you'll notice that I actually got a permission denied error. That's because, in this case I do 191 00:14:47,310 --> 00:14:48,340 need to be root. 192 00:14:48,390 --> 00:14:55,100 So I'm going to be sudo -i for interactive, and then I'm going to paste that same information 193 00:14:57,730 --> 00:15:04,750 and then I should be able to back out of root and type docker-compose version. 194 00:15:05,050 --> 00:15:06,310 And there we go. 195 00:15:06,310 --> 00:15:11,980 In case you're curious back over on the GitHub, I can actually just replace that word compose with machine 196 00:15:14,640 --> 00:15:19,650 and end up right over on the machine page and the releases for docker-machine. 197 00:15:19,650 --> 00:15:26,990 Notice this is on v0.12.2. I can copy this stuff here as well and install it that way instead of the 198 00:15:26,990 --> 00:15:28,850 documentation website way. 199 00:15:28,880 --> 00:15:30,220 So the choice is up to you. 200 00:15:30,380 --> 00:15:33,840 There's not really much information about installation on GitHub. 201 00:15:33,980 --> 00:15:41,090 The much more information is over on the documentation site for Docker that is docs.docker.com. 202 00:15:41,120 --> 00:15:45,740 And then one last piece information here is that because we manually installed these that also means 203 00:15:45,740 --> 00:15:48,850 that Compose and Machine we have to manually update. 204 00:15:48,890 --> 00:15:54,740 So you just need to make it a part of your sort of mental checklist every month or two, to probably go 205 00:15:54,740 --> 00:15:59,620 check for new versions of Compose and Machine because they do update pretty frequently. 206 00:15:59,690 --> 00:16:05,000 Hopefully in the future Docker will add packages to the package managers for these so that we can automatically 207 00:16:05,000 --> 00:16:12,570 update them with the rest of our system just like we do for the Docker install. 208 00:16:12,720 --> 00:16:14,830 OK so let's go get my repo. 209 00:16:14,860 --> 00:16:21,190 Now there's several ways you can do this. One way on GitHub, is that you simply download their GUI 210 00:16:21,640 --> 00:16:26,740 and use it, but they don't actually have an official one for Linux yet. 211 00:16:26,830 --> 00:16:29,270 So you would need to go get a different third party one. 212 00:16:29,350 --> 00:16:31,290 And we're not going to talk about that. 213 00:16:31,290 --> 00:16:35,220 So we're just going to use the command line. 214 00:16:35,260 --> 00:16:41,260 So if you're looking at my repo page under my GitHub account, you'll find that link in the Resource 215 00:16:41,260 --> 00:16:45,270 section under Section 1, under the Getting Resources lecture. 216 00:16:45,460 --> 00:16:49,520 And over here you can just copy this you URL and paste it in the command line. 217 00:16:49,780 --> 00:16:53,250 But if you've never used Git before, you won't have that installed. 218 00:16:53,250 --> 00:16:56,830 So if I tried to git, it would not be there so I do need to install 219 00:16:56,830 --> 00:16:58,040 Git real quick. 220 00:16:59,730 --> 00:17:02,260 OK so now I should have the version. 221 00:17:02,290 --> 00:17:02,580 Yep. 222 00:17:02,610 --> 00:17:06,579 OK I got Git installed, and now I'm just going to make a directory real quick, 223 00:17:08,310 --> 00:17:11,810 To put this repo in. 224 00:17:11,940 --> 00:17:21,040 And so I do git clone, and then I paste in that URL that I got from the web page. And that will pull 225 00:17:21,040 --> 00:17:22,030 down my repo. 226 00:17:22,050 --> 00:17:30,510 Now you could download a zip file of my repo but it does get updated as I fix things or make things 227 00:17:30,510 --> 00:17:31,180 better. 228 00:17:31,320 --> 00:17:36,900 And so it's easier when you're starting this course, maybe a month later if you're still doing the course, 229 00:17:37,230 --> 00:17:38,340 that you just need to do 230 00:17:38,370 --> 00:17:40,870 git inside the directory actually... 231 00:17:40,890 --> 00:17:47,560 So inside the udemy-docker-mastery directory I could just do a git pull, and that would get the latest 232 00:17:47,620 --> 00:17:49,420 updates for the course. 233 00:17:49,420 --> 00:17:49,720 All right. 234 00:17:49,720 --> 00:17:51,960 Next we want to talk about code editors. 235 00:17:52,000 --> 00:17:54,520 I personally like Visual Studio Code. 236 00:17:54,610 --> 00:17:56,080 It's very similar to GitHub's 237 00:17:56,080 --> 00:18:01,870 Atom, if you've ever used that, or Sublime Text, if you've ever used that. Obviously if you're a Vim fan 238 00:18:01,870 --> 00:18:04,750 or Emacs, or any of the other editors you can use all those. 239 00:18:04,870 --> 00:18:09,970 But I will be showing off a little bit of Visual Studio Code in this course because it has a really great 240 00:18:09,970 --> 00:18:11,380 Docker add on. 241 00:18:11,380 --> 00:18:18,100 So I'm going to download the Debian version, and on my version of Linux it actually will automatically 242 00:18:18,100 --> 00:18:22,600 open with the package installer; and, I can install it that way OK. 243 00:18:22,750 --> 00:18:31,510 It's finished installing, now, I can run it. And once you get Visual Studio Code running or just "code" as we call 244 00:18:31,510 --> 00:18:34,690 it or "vs code", (I guess has got lots of names there), 245 00:18:35,050 --> 00:18:44,170 you might want to go into the Extensions and look for Docker. The one that's just called Docker, install 246 00:18:44,170 --> 00:18:51,410 that, and that will allow syntax highlighting and little extra features whenever you're editing the Docker 247 00:18:51,410 --> 00:18:57,520 files in this course. A a nice feature there, is if you're in a directory and you just type code 248 00:18:57,910 --> 00:19:02,380 with a dot after it, it'll actually open a visual studio code in that directory. 249 00:19:02,380 --> 00:19:08,310 So it's sort of a shortcut to get all the files from my course up in your visual studio code. 250 00:19:08,580 --> 00:19:08,850 OK. 251 00:19:08,860 --> 00:19:13,450 And the last little tip we're going to talk about real quick is customizing your terminal. The nice 252 00:19:13,450 --> 00:19:15,850 thing is on Linux is everything is pretty great 253 00:19:15,850 --> 00:19:20,850 out of the box. You have a nice looking terminal usually that comes with Linux. 254 00:19:20,860 --> 00:19:27,300 It works with all the features of Docker and one of the things you'll notice is the command line completion. 255 00:19:27,300 --> 00:19:32,890 That's tab completion that you may have used for a long time where if you're typing a command in Linux 256 00:19:33,190 --> 00:19:38,680 in your shell and you just hit the tab key it will auto finish that and actually show you features around 257 00:19:38,680 --> 00:19:40,390 the options for that command. 258 00:19:40,390 --> 00:19:46,570 So if I just type docker and then hit tab twice it'll actually show me all the different commands I 259 00:19:46,570 --> 00:19:47,460 can use here. 260 00:19:47,590 --> 00:19:49,000 So I could type Docker 261 00:19:51,370 --> 00:19:55,390 image and then hit tab twice again it gives me another one. 262 00:19:55,390 --> 00:20:02,110 And I could say ls, and then I get hit tab twice again and it would give me all the options that I 263 00:20:02,110 --> 00:20:03,930 would have for that particular command. 264 00:20:04,210 --> 00:20:06,420 And that all works out-of-the-box after installing. 265 00:20:06,430 --> 00:20:11,170 You don't have to do anything to get that feature. With Mac and Windows, you have to go through extra steps 266 00:20:11,170 --> 00:20:13,120 in you case you watch those videos. 267 00:20:13,120 --> 00:20:18,940 But in case you're seeing stuff in my course, like the fact that I use the Zsh shell, and then maybe I have 268 00:20:18,940 --> 00:20:23,850 different colors that you like or features, you just need to check out 269 00:20:24,100 --> 00:20:32,940 www.bretfisher.com/shell, and I list everything that I use in my custom shell in a Mac that will 270 00:20:32,940 --> 00:20:40,530 actually work pretty easily inside Linux. So I customize my vim, for example, and other various things 271 00:20:40,530 --> 00:20:41,160 of my shell. 272 00:20:41,280 --> 00:20:42,590 So feel free to check that out. 273 00:20:42,600 --> 00:20:44,980 But it's absolutely not required for this course. 274 00:20:45,030 --> 00:20:46,410 I just get a lot of questions on it. 275 00:20:46,410 --> 00:20:49,350 So I wanted to give you some more info before we get started. 276 00:20:50,540 --> 00:20:52,670 OK so hopefully you have Docker working on your machine. 277 00:20:52,670 --> 00:20:57,420 So let's just review the tips and tricks that we just talked about and all the things we got installed. 278 00:20:57,440 --> 00:21:02,870 After installing Docker, make sure you also get Compose and Machine and you can get them from those 279 00:21:02,870 --> 00:21:08,450 two links or from the GitHub page that I showed you. I didn't mention this earlier but later in the 280 00:21:08,480 --> 00:21:14,780 course, when we get to the sections on swarm, you'll be using Docker Machine to create more VMs, whether 281 00:21:14,870 --> 00:21:20,600 on your machine or in the cloud, that run Docker. So you can have multiple nodes running Docker. Docker 282 00:21:20,720 --> 00:21:26,750 Machine is just one of the ways that you can actually set up another machine to run Docker. You can 283 00:21:26,750 --> 00:21:28,150 check that out any time, 284 00:21:28,220 --> 00:21:30,780 but you won't need it till near the end of the course. 285 00:21:31,490 --> 00:21:36,000 And if you'll remember we talked about Visual Studio Code, so you can check that out. 286 00:21:36,080 --> 00:21:41,210 And bonus! If you're on Linux then bash completion for the commands just works and you don't have to 287 00:21:41,210 --> 00:21:41,600 worry about. 31543

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.