1 00:00:00,000 --> 00:00:04,300 [Intro Music] 2 00:00:04,319 --> 00:00:05,609 Alright guys, in the previous 3 00:00:05,609 --> 00:00:07,019 lecture I have explained you 4 00:00:07,019 --> 00:00:09,029 differences between Docker commands 5 00:00:09,089 --> 00:00:11,099 and Docker management commands. And 6 00:00:11,099 --> 00:00:12,449 Docker management commands have 7 00:00:12,449 --> 00:00:14,729 appeared not long ago, and they 8 00:00:14,729 --> 00:00:17,549 actually combine some of regular 9 00:00:17,549 --> 00:00:19,979 commands. And some people say that 10 00:00:20,039 --> 00:00:22,199 you must use only management 11 00:00:22,199 --> 00:00:23,969 commands, and forget about commands. 12 00:00:24,119 --> 00:00:26,309 But I will argue with that because 13 00:00:26,339 --> 00:00:28,229 Docker commands are much shorter, 14 00:00:28,439 --> 00:00:30,599 and they are much quicker to type. 15 00:00:31,049 --> 00:00:32,848 And also please note that you don't 16 00:00:32,848 --> 00:00:34,919 need to remember all those commands 17 00:00:34,949 --> 00:00:37,919 listed here. You will use just a 18 00:00:37,919 --> 00:00:39,869 part of them on a regular basis. 19 00:00:40,289 --> 00:00:41,999 All right, in this lecture, I want 20 00:00:41,999 --> 00:00:43,289 to show you some alternative 21 00:00:43,289 --> 00:00:45,389 versions of some popular commands 22 00:00:45,569 --> 00:00:47,429 that you could use either with 23 00:00:47,459 --> 00:00:49,319 commands or management commands. 24 00:00:49,619 --> 00:00:51,959 And here is such a list. For 25 00:00:51,959 --> 00:00:54,119 example, most popular command is 26 00:00:54,149 --> 00:00:56,819 'docker ps', and this command lists 27 00:00:56,879 --> 00:00:58,769 all containers that are currently 28 00:00:58,769 --> 00:01:01,679 running. Alternative diversion for 29 00:01:01,709 --> 00:01:03,569 this command with management 30 00:01:03,569 --> 00:01:07,109 command is 'docker container ls'. And 31 00:01:07,109 --> 00:01:09,269 of course, this command has more 32 00:01:09,269 --> 00:01:11,219 characters, and you need more time 33 00:01:11,219 --> 00:01:13,079 to type. That's why I prefer 34 00:01:13,079 --> 00:01:15,059 personally to use this shortcut, 35 00:01:15,089 --> 00:01:18,389 'docker ps'. Next alternative pair is 36 00:01:18,419 --> 00:01:20,969 'docker build', and 'docker builder 37 00:01:20,969 --> 00:01:23,579 build'. And with this command, 38 00:01:23,609 --> 00:01:25,919 you're able to build a new image. 39 00:01:26,159 --> 00:01:27,779 And again, please note that those 40 00:01:27,779 --> 00:01:29,879 commands are completely equivalent, 41 00:01:30,059 --> 00:01:31,949 and you're able to use either this 42 00:01:31,949 --> 00:01:35,489 one or this one. Great. Next pair is 43 00:01:35,489 --> 00:01:37,649 'docker inspect', and 'docker container 44 00:01:37,649 --> 00:01:39,989 inspect'. With this command you're 45 00:01:39,989 --> 00:01:42,209 able to inspect, and read 46 00:01:42,209 --> 00:01:44,339 details about a specific container 47 00:01:44,399 --> 00:01:46,589 that was created before. And again 48 00:01:46,589 --> 00:01:47,819 you're able to use either a 49 00:01:47,819 --> 00:01:50,069 shortcut 'docker inspect' or 'docker 50 00:01:50,069 --> 00:01:52,049 container inspect', where container 51 00:01:52,049 --> 00:01:53,879 is Management Command, and inspect 52 00:01:53,939 --> 00:01:57,089 is sub-command. Next example is 53 00:01:57,119 --> 00:01:59,039 'docker commit' and 'docker container 54 00:01:59,039 --> 00:02:01,019 commit'. With this command, you're 55 00:02:01,019 --> 00:02:03,119 able to create the image based on 56 00:02:03,119 --> 00:02:05,879 specific container. And the last 57 00:02:05,879 --> 00:02:07,859 example is 'docker run' and 'docker 58 00:02:07,859 --> 00:02:09,839 container run'. It is also very 59 00:02:09,839 --> 00:02:11,818 popular command, and I prefer to use 60 00:02:11,878 --> 00:02:13,589 this shortcut. With this command 61 00:02:13,619 --> 00:02:15,419 you're able to start a new 62 00:02:15,419 --> 00:02:17,309 container, or if you want you're 63 00:02:17,309 --> 00:02:19,379 able to use Management Command, 64 00:02:19,409 --> 00:02:21,749 'docker container run' to perform the 65 00:02:21,749 --> 00:02:24,359 same action. Great. That's 66 00:02:24,359 --> 00:02:26,939 alternative of some commands, and 67 00:02:27,089 --> 00:02:28,289 much more commands have 68 00:02:28,319 --> 00:02:29,519 alternatives with management 69 00:02:29,519 --> 00:02:31,469 commands, but I have just shown you 70 00:02:31,499 --> 00:02:33,359 some examples of them in order to 71 00:02:33,359 --> 00:02:35,519 get an idea of what is alternative 72 00:02:35,519 --> 00:02:36,749 command for Management Command. 73 00:02:37,109 --> 00:02:38,999 Great. Let me quickly go to terminal, 74 00:02:39,119 --> 00:02:43,499 and use 'docker ps' command; and this 75 00:02:43,499 --> 00:02:45,389 command will show you currently running 76 00:02:45,389 --> 00:02:47,369 containers. And at the moment, this 77 00:02:47,369 --> 00:02:49,859 list in my case is empty. And I 78 00:02:49,859 --> 00:02:50,999 could use same command with 79 00:02:50,999 --> 00:02:52,949 Management Command, docker container 80 00:02:53,489 --> 00:02:56,069 ls'; and here in this output you see 81 00:02:56,069 --> 00:02:58,109 the same result as you see in 82 00:02:58,139 --> 00:03:00,599 'docker ps' output. And that means 83 00:03:00,599 --> 00:03:02,999 that those two commands are completely 84 00:03:03,029 --> 00:03:05,729 equivalent. Great. That's all for 85 00:03:05,729 --> 00:03:07,739 this lecture. And please note that 86 00:03:07,799 --> 00:03:09,869 you're able to use either short 87 00:03:09,869 --> 00:03:11,849 versions of commands or long 88 00:03:11,849 --> 00:03:13,589 versions with management commands. 89 00:03:13,919 --> 00:03:16,049 And probably in the future Docker 90 00:03:16,079 --> 00:03:18,449 developers will remove some Docker 91 00:03:18,449 --> 00:03:20,579 commands like 'docker ps', 'docker 92 00:03:20,579 --> 00:03:22,529 build', 'docker inspect', but I 93 00:03:22,529 --> 00:03:24,689 personally don't think so, because 94 00:03:24,689 --> 00:03:26,819 many many people use short versions 95 00:03:26,849 --> 00:03:29,399 and they are used to them. Alright, 96 00:03:29,399 --> 00:03:31,109 let's proceed, and next let's 97 00:03:31,109 --> 00:03:33,329 start talking about containers and 98 00:03:33,359 --> 00:03:35,189 images, and start performing 99 00:03:35,189 --> 00:03:37,109 some practical activities. And I 100 00:03:37,109 --> 00:03:38,819 will tell you how to pull image 101 00:03:38,819 --> 00:03:40,319 from Docker Hub, and how to create a 102 00:03:40,349 --> 00:03:42,059 new container based on that image. 103 00:03:42,239 --> 00:03:44,039 Also, I will explain the structure 104 00:03:44,069 --> 00:03:46,319 of image and container. I'll see 105 00:03:46,319 --> 00:03:47,688 you in the next lecture. Bye-Bye. 106 00:03:47,688 --> 00:03:49,674 [no audio]