1 00:00:00,000 --> 00:00:04,700 [Intro Music] 2 00:00:04,770 --> 00:00:06,300 Now let me demonstrate to you guys 3 00:00:06,330 --> 00:00:09,420 another popular image called 'httpd'. 4 00:00:09,870 --> 00:00:12,420 It is actually Apache HTTP Web 5 00:00:12,420 --> 00:00:14,430 Server. And before in this course, 6 00:00:14,460 --> 00:00:16,739 we have created Express web 7 00:00:16,739 --> 00:00:19,860 server using Node.js. But httpd is a 8 00:00:19,860 --> 00:00:21,630 very popular choice; and you are 9 00:00:21,630 --> 00:00:23,520 able to create the web server 10 00:00:23,640 --> 00:00:25,260 immediately out of the box; and you 11 00:00:25,260 --> 00:00:27,930 see that total downloads count is 12 00:00:27,960 --> 00:00:30,240 greater than 1 billion. All right, 13 00:00:30,390 --> 00:00:31,770 let me quickly create this 14 00:00:31,770 --> 00:00:34,080 container and verify how it works. 15 00:00:34,320 --> 00:00:36,300 Let's go to terminal, and here let's 16 00:00:36,300 --> 00:00:38,400 immediately run it like so, 'docker 17 00:00:38,430 --> 00:00:41,070 run httpd'; and let's immediately 18 00:00:41,070 --> 00:00:43,410 expose internal port, by default 19 00:00:43,440 --> 00:00:46,200 httpd has Port 80 opened, and Let's 20 00:00:46,200 --> 00:00:48,840 expose it to external port 8080. 21 00:00:49,080 --> 00:00:51,990 '-p' here, and external port will 22 00:00:51,990 --> 00:00:54,660 be 8080, and internal is 80. 23 00:00:54,900 --> 00:00:56,700 And let's run this container in 24 00:00:56,700 --> 00:00:59,370 background, '-d', like so. Let's 25 00:00:59,370 --> 00:01:01,350 press Enter. As usually, unable to 26 00:01:01,350 --> 00:01:03,720 find image locally. Pulling image 27 00:01:03,720 --> 00:01:05,879 from Docker Hub. Notice that one of 28 00:01:05,879 --> 00:01:08,220 the fs layer is already present in 29 00:01:08,250 --> 00:01:10,680 our local cache. Let's wait a bit. 30 00:01:11,430 --> 00:01:13,710 Pull complete, and container was 31 00:01:13,710 --> 00:01:16,500 created. 'docker ps', and now 32 00:01:16,530 --> 00:01:18,960 container is running. Let's go to web 33 00:01:18,960 --> 00:01:21,900 browser and try to connect to httpd 34 00:01:21,900 --> 00:01:24,700 web server. localhost:8080. 35 00:01:24,700 --> 00:01:26,600 [no audio] 36 00:01:26,600 --> 00:01:29,100 And I see, 'It works!'. And that's how you're 37 00:01:29,190 --> 00:01:31,200 able to pretty fast and easily create 38 00:01:31,230 --> 00:01:33,420 a web server using httpd 39 00:01:33,420 --> 00:01:35,730 container. Also, as additional 40 00:01:35,730 --> 00:01:37,410 challenge, you could try to 41 00:01:37,410 --> 00:01:40,050 override the default html page that 42 00:01:40,050 --> 00:01:42,360 is served by this web server. But 43 00:01:42,360 --> 00:01:44,250 that's again up to you. That's all 44 00:01:44,250 --> 00:01:45,450 for this lecture. And let me 45 00:01:45,450 --> 00:01:47,430 quickly kill this container and 46 00:01:47,430 --> 00:01:50,190 clean up our current setup. 'docker 47 00:01:50,250 --> 00:01:56,070 stop a6', and 'docker rm a6'. 48 00:01:56,970 --> 00:01:58,770 Great, that's all for this lecture. 49 00:01:58,800 --> 00:02:00,360 And that's all actually for this 50 00:02:00,360 --> 00:02:02,160 section. And next let me quickly 51 00:02:02,160 --> 00:02:04,320 summarize what we have discussed in 52 00:02:04,320 --> 00:02:06,674 it. I'll see you next guys. Bye-Bye. 53 00:02:06,674 --> 00:02:09,258 [no audio]