1 00:00:01,020 --> 00:00:05,190 ‫Now you might still be wondering even ‫after learning some of the key features 2 00:00:05,190 --> 00:00:08,250 ‫of Docker, why does Docker need to exist? 3 00:00:08,610 --> 00:00:13,290 ‫Obviously, we've been packaging software ‫for decades with tons of other package 4 00:00:13,320 --> 00:00:15,600 ‫managers deploying software to servers. 5 00:00:16,050 --> 00:00:17,700 ‫So let's talk about it. 6 00:00:18,030 --> 00:00:19,980 ‫This video is going to focus on. 7 00:00:20,400 --> 00:00:22,026 ‫Three things around. 8 00:00:22,026 --> 00:00:23,946 ‫Why Docker and why now? 9 00:00:24,066 --> 00:00:27,276 ‫And at the time it was ‫created, there was friction. 10 00:00:27,486 --> 00:00:35,196 ‫There was things in the way of us going ‫to the next level of speed and ease of use 11 00:00:35,586 --> 00:00:39,306 ‫of the software lifecycle, particularly ‫around packaging, distributing and 12 00:00:39,306 --> 00:00:41,406 ‫running all the software we're making. 13 00:00:41,927 --> 00:00:43,967 ‫And I like lists of three, I guess. 14 00:00:43,997 --> 00:00:49,877 ‫So this main list of isolation, ‫environments and speed, those 15 00:00:49,877 --> 00:00:54,107 ‫three areas are what I want to talk ‫about as the three overall reasons. 16 00:00:54,107 --> 00:00:59,027 ‫I feel like the containers themselves had ‫to exist and why they're so popular today. 17 00:01:00,027 --> 00:01:02,247 ‫first up the problem of isolation. 18 00:01:02,547 --> 00:01:06,147 ‫And if we go back to the beginning ‫of my career, back in the nineties, 19 00:01:06,842 --> 00:01:12,182 ‫We can start talking about what servers ‫used to be before we had containers. 20 00:01:12,452 --> 00:01:17,162 ‫If we go back even farther than just ‫2013, before Docker was created. 21 00:01:17,372 --> 00:01:20,732 ‫And we talk about the early two thousands ‫in the nineties, when we moved from 22 00:01:20,732 --> 00:01:25,452 ‫mainframe to PC , this might be what ‫a typical admin would look like. 23 00:01:25,482 --> 00:01:28,242 ‫I had a couple of servers per company. 24 00:01:28,242 --> 00:01:32,192 ‫You know, we, we wouldn't really be able ‫to manage a hundred servers per person. 25 00:01:32,202 --> 00:01:33,972 ‫Again, this was like, you know, 2000. 26 00:01:34,422 --> 00:01:36,592 ‫And so we would have these ‫very expensive, large servers. 27 00:01:36,982 --> 00:01:40,602 ‫That it was rare to consume all ‫their resources with a single app. 28 00:01:40,872 --> 00:01:45,552 ‫So then you'd end up with all ‫these apps, just all cobbled 29 00:01:45,552 --> 00:01:46,842 ‫together on the same server. 30 00:01:47,082 --> 00:01:48,852 ‫And the server became brittle. 31 00:01:49,032 --> 00:01:53,412 ‫It became hard to manage because you might ‫need to change one thing for one app and 32 00:01:53,412 --> 00:01:54,792 ‫then another app needed a different thing. 33 00:01:54,792 --> 00:01:57,912 ‫And then you'd have to manage their ‫different Python versions or your 34 00:01:57,912 --> 00:02:01,572 ‫different Apache versions on different ‫servers, just to balance it all out. 35 00:02:01,572 --> 00:02:04,602 ‫At the same time, you wanted to ‫put more and more stuff on each 36 00:02:04,602 --> 00:02:06,882 ‫server, but nothing was isolated. 37 00:02:06,882 --> 00:02:10,572 ‫So all these apps were ‫sharing the same file system. 38 00:02:10,572 --> 00:02:13,872 ‫They usually couldn't be multiple ‫versions of that app without 39 00:02:13,872 --> 00:02:16,152 ‫lots of complicated hacking. 40 00:02:16,332 --> 00:02:18,732 ‫And that was a big problem. 41 00:02:19,242 --> 00:02:20,562 ‫Then came VMs. 42 00:02:21,561 --> 00:02:27,652 ‫So once VMs became really popular, even ‫before the cloud, we were able to abstract 43 00:02:27,652 --> 00:02:33,351 ‫out all of our applications and start ‫putting fewer applications on smaller 44 00:02:33,351 --> 00:02:35,992 ‫VMs, all riding on the same large host. 45 00:02:36,801 --> 00:02:40,011 ‫So it might look like this and we ‫might start with Chef or Puppet 46 00:02:40,041 --> 00:02:45,231 ‫as some way to manage all these ‫growing numbers of servers. 47 00:02:45,531 --> 00:02:50,571 ‫In fact, we would have so many servers ‫then by the early 2010s, before Dockers 48 00:02:50,571 --> 00:02:56,211 ‫creation, that it was becoming very hard ‫to manage all of them at once you were 49 00:02:56,211 --> 00:03:00,461 ‫one single admin, maybe trying to manage ‫dozens, if not, hundreds of servers. 50 00:03:00,811 --> 00:03:05,341 ‫Even with the cloud, helping us spin up ‫machines faster, tearing them down faster. 51 00:03:05,701 --> 00:03:10,621 ‫It was a lot, it was so much to manage, ‫that it just became too much for a lot 52 00:03:10,621 --> 00:03:14,721 ‫of us and the cloud, I think made it ‫better, but also worse because it made it 53 00:03:14,721 --> 00:03:16,845 ‫so much easier to spin up so many more. 54 00:03:17,061 --> 00:03:18,711 ‫So how can Docker help with that? 55 00:03:18,711 --> 00:03:22,671 ‫How can it help us reduce the ‫amount of infrastructure to manage 56 00:03:22,821 --> 00:03:26,751 ‫while also ensuring isolation of ‫our workload so that things don't 57 00:03:26,751 --> 00:03:28,641 ‫become brittle or hard to manage? 58 00:03:29,141 --> 00:03:33,821 ‫Well, if this was our setup 20 years ‫ago, instead of spreading out all 59 00:03:33,821 --> 00:03:39,101 ‫these VMs with unnecessary numbers ‫of OSs, what containers do is they 60 00:03:39,101 --> 00:03:42,451 ‫give us the isolation, like a VM. 61 00:03:42,691 --> 00:03:47,431 ‫It's not quite the same, but we'll just ‫argue for now that it's an isolation 62 00:03:47,431 --> 00:03:50,791 ‫layer, where they get their own IP ‫address, they get their own file system, 63 00:03:50,791 --> 00:03:52,531 ‫they get their own process space. 64 00:03:52,891 --> 00:03:57,841 ‫And so it seems like almost a full ‫VM, but you don't need all the 65 00:03:57,841 --> 00:04:01,531 ‫different operating systems so we can ‫reduce our operating system count. 66 00:04:01,791 --> 00:04:03,166 ‫Our physical host count. 67 00:04:03,406 --> 00:04:06,646 ‫You no longer have to use VMs ‫as the layer of isolation. 68 00:04:07,096 --> 00:04:10,396 ‫And it might look like this instead ‫of using SSH, you would use the 69 00:04:10,396 --> 00:04:14,176 ‫Docker CLI . Or if you move on to ‫Kubernetes, you could use the Kubernetes 70 00:04:14,206 --> 00:04:18,586 ‫CLI and your applications are all ‫isolated in their own containers. 71 00:04:19,058 --> 00:04:23,258 ‫This allows you many benefits, including ‫running multiple versions of the same app 72 00:04:23,288 --> 00:04:25,958 ‫on the same system, without any conflict. 73 00:04:26,958 --> 00:04:29,298 ‫Next up the problem of environments. 74 00:04:29,688 --> 00:04:33,618 ‫And obviously we were spinning up ‫tons of OSS, like I talked about, 75 00:04:33,978 --> 00:04:38,148 ‫but the number of different types ‫of environments was also increasing. 76 00:04:38,668 --> 00:04:40,768 ‫Did you ever hear of works on my machine? 77 00:04:41,068 --> 00:04:44,788 ‫It was sort of made famous ‫as a joke by Jeff Atwood. 78 00:04:44,938 --> 00:04:50,068 ‫One of the founders of stack overflow in a ‫famous blog post from way back in the day. 79 00:04:50,308 --> 00:04:53,998 ‫But this works on my machine idea ‫was a little snarky, but the joke 80 00:04:53,998 --> 00:04:59,173 ‫was it is often the developer's job ‫to ensure the application works right. 81 00:04:59,713 --> 00:05:03,223 ‫But they don't have all the environments ‫that are necessary for this app to run in. 82 00:05:03,223 --> 00:05:06,973 ‫So they just run it on their machine, ‫they test on their machine and then 83 00:05:06,973 --> 00:05:10,993 ‫when it doesn't work somewhere else, ‫they say that works on my machine. 84 00:05:11,593 --> 00:05:16,653 ‫It's really challenging when we have ‫all these different OSs, and Docker 85 00:05:16,683 --> 00:05:21,093 ‫coined this, the matrix from hell, ‫which essentially means for every 86 00:05:21,093 --> 00:05:22,773 ‫part of your app, which is above me. 87 00:05:23,283 --> 00:05:27,123 ‫And then for every type of ‫environment over here on this. 88 00:05:27,968 --> 00:05:30,398 ‫You have a different configuration. 89 00:05:30,398 --> 00:05:32,888 ‫Maybe you have to install the ‫dependencies a different way. 90 00:05:33,068 --> 00:05:35,948 ‫Maybe the dependencies are slightly ‫different because one has a 91 00:05:35,948 --> 00:05:37,148 ‫different version in the other. 92 00:05:37,388 --> 00:05:41,288 ‫You have all these different types of ‫environments, and you've probably had 93 00:05:41,288 --> 00:05:45,818 ‫to either read or write documentation ‫on how the app that the developer 94 00:05:45,818 --> 00:05:49,568 ‫uses on Mac needs to be installed ‫differently on windows, which needs 95 00:05:49,568 --> 00:05:52,978 ‫to be installed differently on a ‫Linux server and on and on and on. 96 00:05:53,913 --> 00:05:59,523 ‫Now the container image and the ‫container itself became a fundamental 97 00:05:59,943 --> 00:06:05,913 ‫abstract or a contract between where ‫it's run and what's running inside it. 98 00:06:06,123 --> 00:06:09,753 ‫Much like physical containers in ‫the real world that allow us to 99 00:06:09,753 --> 00:06:14,403 ‫ship goods all around the world from ‫almost a hundred year ago design. 100 00:06:14,703 --> 00:06:18,663 ‫The goal there was, the people that ‫deliver the physical containers didn't 101 00:06:18,663 --> 00:06:20,253 ‫have to know what was inside it. 102 00:06:20,403 --> 00:06:23,343 ‫And the people that put their stuff ‫inside the container didn't have 103 00:06:23,343 --> 00:06:27,723 ‫to know or care how the container ‫physically got to its destination. 104 00:06:28,113 --> 00:06:34,423 ‫Those were an abstraction of now epic ‫proportions of millions of containers all 105 00:06:34,423 --> 00:06:37,993 ‫around the world being shipped, and pretty ‫much everything in your house has probably 106 00:06:37,993 --> 00:06:39,313 ‫been in a container in its lifetime. 107 00:06:39,733 --> 00:06:42,643 ‫The same thing is true of images ‫and Docker containers now. 108 00:06:42,913 --> 00:06:47,413 ‫They are a consistent standard format ‫known now as the OCI standards. 109 00:06:47,848 --> 00:06:51,748 ‫Those ensure that wherever you run ‫the container, it will be run the 110 00:06:51,748 --> 00:06:55,378 ‫same consistent way with the same ‫exact dependencies it was built with. 111 00:06:56,188 --> 00:06:58,138 ‫Next up the problem of speed. 112 00:06:58,528 --> 00:07:00,628 ‫Now I don't necessarily mean here. 113 00:07:00,628 --> 00:07:02,848 ‫The speed of CPU's or the speed of. 114 00:07:03,853 --> 00:07:07,843 ‫Those things just naturally get ‫faster over time, but I'm really 115 00:07:07,843 --> 00:07:10,063 ‫talking about the speed of business. 116 00:07:10,243 --> 00:07:15,793 ‫And when we talk about IT, and software, ‫and the software lifecycle, we're really 117 00:07:15,793 --> 00:07:20,173 ‫talking about the ability for businesses ‫and organizations to execute on their 118 00:07:20,173 --> 00:07:26,448 ‫ideas, to deliver their software ideas ‫to the customer as fast as possible, and 119 00:07:26,478 --> 00:07:28,188 ‫that's part of the software life cycle. 120 00:07:28,518 --> 00:07:32,598 ‫Well, it turns out that the industry ‫has been shifting infrastructure 121 00:07:32,598 --> 00:07:37,518 ‫and architecture since the Dawn of ‫computing for this exact reason. 122 00:07:38,068 --> 00:07:42,628 ‫I made this nice little graphic ‫because you can start at the top way 123 00:07:42,628 --> 00:07:46,108 ‫back in the nineties where I got my ‫start and we had mainframes moving 124 00:07:46,108 --> 00:07:48,208 ‫to PCs in a distributed architecture. 125 00:07:48,568 --> 00:07:53,338 ‫That was largely about the speed ‫of being able to deploy change. 126 00:07:53,518 --> 00:07:57,738 ‫You were now able to install DOS on ‫a single machine, without having to 127 00:07:57,738 --> 00:08:01,818 ‫wait for the mainframe to be updated ‫to whatever the next Unix version was. 128 00:08:01,868 --> 00:08:04,628 ‫We no longer could move all at once. 129 00:08:04,628 --> 00:08:08,108 ‫We needed different parts of our ‫organization to move in different 130 00:08:08,108 --> 00:08:09,748 ‫directions at different speeds. 131 00:08:10,078 --> 00:08:11,918 ‫Hence the Dawn of distributed computing. 132 00:08:12,248 --> 00:08:17,468 ‫Then we went from bare metal, the virtual, ‫because we were tired of waiting on the 133 00:08:17,468 --> 00:08:20,948 ‫ordering of hardware and waiting for ‫it to be implemented in a data center. 134 00:08:20,948 --> 00:08:25,058 ‫We wanted to speed things up and get ‫better utilization of our resources. 135 00:08:25,758 --> 00:08:30,018 ‫Virtualization and virtual machines became ‫extremely popular for those reasons. 136 00:08:30,438 --> 00:08:35,298 ‫Then data center to cloud was the next ‫step because we were now needing to 137 00:08:35,388 --> 00:08:40,668 ‫deploy ideas even faster than our own ‫hardware and data centers could allow. 138 00:08:40,878 --> 00:08:44,478 ‫We wanted to run servers that ‫we didn't currently have in 139 00:08:44,478 --> 00:08:46,338 ‫minutes, not days or weeks. 140 00:08:46,578 --> 00:08:50,108 ‫And the cloud gave us access ‫to near instant resources. 141 00:08:50,648 --> 00:08:54,443 ‫Which, Obviously, it's the reason ‫why the cloud is so huge today. 142 00:08:54,743 --> 00:08:57,773 ‫And then finally, we're on ‫the next leg of that journey. 143 00:08:58,013 --> 00:09:02,453 ‫Moving from the massive host expansion ‫that we had, where we had too many 144 00:09:02,453 --> 00:09:04,343 ‫hosts and kernels and operating systems. 145 00:09:04,763 --> 00:09:08,603 ‫And now we're going to be able to ‫reduce the number of those, because 146 00:09:08,603 --> 00:09:12,593 ‫we're now able to isolate the ‫workloads inside them and safely run 147 00:09:12,593 --> 00:09:14,563 ‫them together on the same kernel. 148 00:09:15,373 --> 00:09:18,848 ‫I'm including serverless here, by the ‫way, because if you really dig into most 149 00:09:18,848 --> 00:09:21,788 ‫serverless platforms, they're really just ‫running containers in the background. 150 00:09:22,088 --> 00:09:25,658 ‫It may be a container that you shipped as ‫an image, or it just may be a container 151 00:09:25,658 --> 00:09:28,748 ‫that they're running your function in, ‫but they're still running in a container. 152 00:09:29,298 --> 00:09:33,888 ‫And this is why I like to talk about ‫faster, faster, faster, essentially what 153 00:09:33,888 --> 00:09:38,028 ‫containers and Docker give you is an ‫ability to develop faster, to build your 154 00:09:38,028 --> 00:09:42,288 ‫apps faster, to test them faster and ‫to deploy them to your servers faster. 155 00:09:43,028 --> 00:09:44,138 ‫Now are you still with me? 156 00:09:44,288 --> 00:09:45,278 ‫Do I still have your attention? 157 00:09:45,458 --> 00:09:46,988 ‫Let's recap that real quick. 158 00:09:47,108 --> 00:09:51,008 ‫So the reason that containers ‫exist is three major reasons. 159 00:09:51,008 --> 00:09:56,618 ‫In my opinion, the better isolation ‫inside a single OS, saving us time 160 00:09:56,618 --> 00:10:00,638 ‫and OS and dependency management, ‫but also giving us the isolation we 161 00:10:00,638 --> 00:10:02,498 ‫need to protect our applications. 162 00:10:02,768 --> 00:10:06,068 ‫Then we have reduced ‫environmental variances. 163 00:10:06,128 --> 00:10:10,478 ‫So the difference between each ‫environment that it runs is very minimal. 164 00:10:10,508 --> 00:10:14,498 ‫Again, usually just your connection ‫settings for databases, maybe some 165 00:10:14,498 --> 00:10:17,618 ‫URL paths, stuff like that, ports. 166 00:10:17,798 --> 00:10:21,518 ‫And then the rest is all exactly ‫the same as you built and tested it. 167 00:10:22,068 --> 00:10:26,238 ‫And finally increasing our speed of ‫change, not just for the software 168 00:10:26,238 --> 00:10:29,238 ‫itself, but for the business that ‫wants to implement that software. 169 00:10:29,418 --> 00:10:33,288 ‫We're now able to develop faster, ‫build it faster, deploy it, the 170 00:10:33,288 --> 00:10:35,688 ‫servers faster and test it faster. 171 00:10:35,688 --> 00:10:39,498 ‫All because these container images ‫and the containers themselves 172 00:10:39,678 --> 00:10:43,488 ‫are so easy to build, deploy, and ‫redeploy and rerun and all that. 173 00:10:44,128 --> 00:10:45,298 ‫So I hope this makes sense. 174 00:10:45,688 --> 00:10:47,158 ‫I'll see you in the next video.