1 00:00:00,740 --> 00:00:04,640 Create and manage Windows Server container images. 2 00:00:04,640 --> 00:00:06,980 The Hello World type of question when we're 3 00:00:06,980 --> 00:00:09,770 confronted with Docker containers is, 4 00:00:09,770 --> 00:00:13,780 what's the difference between a Docker container and a virtual machine, 5 00:00:13,780 --> 00:00:14,830 and why would you care? 6 00:00:14,830 --> 00:00:17,890 After all, we're administrators, not developers. 7 00:00:17,890 --> 00:00:19,610 Well, as an administrator, 8 00:00:19,610 --> 00:00:23,810 you're probably creating environments that are consumed by your developers. 9 00:00:23,810 --> 00:00:27,260 Virtual machines, as I'm sure you know by now, 10 00:00:27,260 --> 00:00:33,260 are software‑based computer instances that run on top of a hypervisor platform. 11 00:00:33,260 --> 00:00:37,460 So, in Microsoft land, we have Hyper‑V as our hypervisor, 12 00:00:37,460 --> 00:00:42,240 and then in our virtual machine, we have a virtualized set of hardware, 13 00:00:42,240 --> 00:00:44,480 CPU, RAM, network, storage. 14 00:00:44,480 --> 00:00:48,460 Of course, the VMs are all sharing that hardware from the host. 15 00:00:48,460 --> 00:00:51,700 But the point is we've got the full stack within each VM, 16 00:00:51,700 --> 00:00:54,240 a full instance of the operating system, 17 00:00:54,240 --> 00:00:58,580 all software binaries, dependencies, and then your applications. 18 00:00:58,580 --> 00:01:01,890 It's a lot faster nowadays for your developers to do 19 00:01:01,890 --> 00:01:05,560 their test and dev work and even present services in 20 00:01:05,560 --> 00:01:07,840 production using Docker containers. 21 00:01:07,840 --> 00:01:09,970 Now if we compare and contrast, by the way, 22 00:01:09,970 --> 00:01:14,340 this diagram, you can see the attribution URL in the lower left corner, 23 00:01:14,340 --> 00:01:18,560 just wanted to say that, we still have the underlying hardware infrastructure, 24 00:01:18,560 --> 00:01:23,680 but instead of having each container enclosing a full operating system, 25 00:01:23,680 --> 00:01:27,020 which is pretty heavy in terms of disk space and network 26 00:01:27,020 --> 00:01:30,140 bandwidth allocation and just simple upkeep, 27 00:01:30,140 --> 00:01:33,100 we have a single operating system and a single 28 00:01:33,100 --> 00:01:35,370 container engine running on our host, 29 00:01:35,370 --> 00:01:39,050 and each Docker container is simply the application and 30 00:01:39,050 --> 00:01:41,700 its supporting binaries and libraries. 31 00:01:41,700 --> 00:01:45,260 Now there's some underlying smoke and mirrors that are going on. 32 00:01:45,260 --> 00:01:49,560 We can look at Docker containers running on a container host as basically 33 00:01:49,560 --> 00:01:54,090 processes because those containers are all sharing the underlying 34 00:01:54,090 --> 00:01:57,450 container engine operating system and host hardware. 35 00:01:57,450 --> 00:01:58,000 However, 36 00:01:58,000 --> 00:02:01,080 Microsoft put a little wrinkle on that with Hyper‑V 37 00:02:01,080 --> 00:02:03,500 containers that we'll learn about momentarily. 38 00:02:03,500 --> 00:02:04,640 Long story short, 39 00:02:04,640 --> 00:02:09,140 containers represent a way to virtualize individual applications 40 00:02:09,140 --> 00:02:11,690 in a way that's much faster and more portable, 41 00:02:11,690 --> 00:02:17,740 generally speaking, than doing the same thing with big old virtual machines. 42 00:02:17,740 --> 00:02:22,210 Now this notion of application virtualization is not specific to Docker. 43 00:02:22,210 --> 00:02:22,810 In fact, 44 00:02:22,810 --> 00:02:28,760 the underlying techniques in Linux that support containerization predate Docker. 45 00:02:28,760 --> 00:02:33,020 Docker just presented a uniform API for working with those 46 00:02:33,020 --> 00:02:35,640 application virtualization technologies. 47 00:02:35,640 --> 00:02:39,150 And Microsoft and Docker have a really tight partnership. 48 00:02:39,150 --> 00:02:43,420 They've been very close business partners for the last several years; therefore, 49 00:02:43,420 --> 00:02:47,510 it is absolutely in scope for your AZ‑800 and AZ‑801 50 00:02:47,510 --> 00:02:49,830 exams for you to know a bit about Docker, 51 00:02:49,830 --> 00:02:50,530 okay? 52 00:02:50,530 --> 00:02:54,010 So here in this blurry image, sorry, it was the highest res I could find, 53 00:02:54,010 --> 00:02:55,350 it shows the Docker workflow. 54 00:02:55,350 --> 00:02:58,780 To build a container involves first getting hold of an 55 00:02:58,780 --> 00:03:00,740 image or creating your own image. 56 00:03:00,740 --> 00:03:04,480 You create a Docker image by installing the Docker CLI, 57 00:03:04,480 --> 00:03:07,110 Docker command‑line tools, the build tools on your system, 58 00:03:07,110 --> 00:03:09,340 of course, these are available for Windows, 59 00:03:09,340 --> 00:03:12,800 macOS, and Linux, and you create what's called a Dockerfile. 60 00:03:12,800 --> 00:03:15,910 This is a set of instructions using a domain‑specific 61 00:03:15,910 --> 00:03:19,460 syntax that Docker created that provides instructions on 62 00:03:19,460 --> 00:03:21,540 what you want to be in your image, 63 00:03:21,540 --> 00:03:24,850 and you'll always start with an existing image, 64 00:03:24,850 --> 00:03:27,500 and then you can add and subtract from there. 65 00:03:27,500 --> 00:03:29,990 We don't need to get too much deeper into the weeds there. 66 00:03:29,990 --> 00:03:33,350 You do need to know just a little bit about the Dockerfile 67 00:03:33,350 --> 00:03:35,930 syntax in case you see that on your exam, 68 00:03:35,930 --> 00:03:37,670 and I'll show you how to do that in the demo, 69 00:03:37,670 --> 00:03:38,840 so don't worry about that. 70 00:03:38,840 --> 00:03:43,910 But bottom line is your Dockerfile is then built or compiled into an image. 71 00:03:43,910 --> 00:03:47,140 Again, you do this all using the Docker client tools. 72 00:03:47,140 --> 00:03:51,840 That image is a binary snapshot of the container contents, 73 00:03:51,840 --> 00:03:56,760 and this is going to be what you use to run or spawn Docker containers. 74 00:03:56,760 --> 00:03:58,750 That's the highest‑level view here. 75 00:03:58,750 --> 00:04:01,850 Again, the image is the binary deployable unit, 76 00:04:01,850 --> 00:04:06,030 and you'll want to keep your Docker images in a central repository to where 77 00:04:06,030 --> 00:04:08,940 your developers and infrastructure people can get to them. 78 00:04:08,940 --> 00:04:12,050 And because the Docker files are plain text files, 79 00:04:12,050 --> 00:04:14,290 you'll want to keep those in Source Code Control. 80 00:04:14,290 --> 00:04:18,380 In order to run Docker containers, you'll need the Docker server component, 81 00:04:18,380 --> 00:04:20,880 and this is called a daemon, or in Windows, 82 00:04:20,880 --> 00:04:23,110 it'd be a Windows service, the Docker service, 83 00:04:23,110 --> 00:04:25,330 same idea, it's a background process, 84 00:04:25,330 --> 00:04:28,830 and this on the Docker host supports that runtime 85 00:04:28,830 --> 00:04:30,540 environment for your containers. 86 00:04:30,540 --> 00:04:33,420 And of course, we've got support for Windows Server for Docker, 87 00:04:33,420 --> 00:04:37,230 for Windows 10, Windows 11 client, and then Azure as well. 88 00:04:37,230 --> 00:04:41,130 One of the value propositions among many of containerizing 89 00:04:41,130 --> 00:04:43,320 your workloads is that they're universal, 90 00:04:43,320 --> 00:04:44,770 they can run in any environment. 91 00:04:44,770 --> 00:04:49,170 The bottom line is it doesn't matter whether your Docker host is in Amazon or 92 00:04:49,170 --> 00:04:53,230 Google Cloud or Azure or on‑premises or in another provider. 93 00:04:53,230 --> 00:04:56,290 As long as you've got the Docker daemon running, 94 00:04:56,290 --> 00:05:00,000 you should be able to create containers based on those images. 95 00:05:00,000 --> 00:05:04,530 It's a really universal way to develop and deliver software. 96 00:05:04,530 --> 00:05:12,000 This is one of the big reasons why Docker has such a big foothold in the business and software development lifecycle market.