1 00:00:00,000 --> 00:00:03,000 [intro music] 2 00:00:04,319 --> 00:00:05,999 Hi guys, welcome to the next 3 00:00:05,999 --> 00:00:08,009 section. In the previous section we 4 00:00:08,009 --> 00:00:09,899 have talked about the main Docker 5 00:00:09,899 --> 00:00:11,639 components like Docker Client, 6 00:00:11,669 --> 00:00:13,349 Docker Host, Docker Server, 7 00:00:13,559 --> 00:00:15,419 Docker Image, Docker Container, 8 00:00:15,569 --> 00:00:17,159 Docker Registry, and Docker 9 00:00:17,189 --> 00:00:19,319 Repository. And also I have 10 00:00:19,319 --> 00:00:21,089 explained you differences between 11 00:00:21,209 --> 00:00:22,829 the virtual machines and Docker 12 00:00:22,829 --> 00:00:25,349 containers. And in this section, we 13 00:00:25,349 --> 00:00:26,459 will start some practice 14 00:00:26,459 --> 00:00:28,469 activities. And I would like to 15 00:00:28,469 --> 00:00:31,859 start with explanation of list of 16 00:00:31,919 --> 00:00:33,569 commands that you are able to use 17 00:00:33,599 --> 00:00:35,459 in Docker. And there are two 18 00:00:35,489 --> 00:00:38,189 different blocks of commands called 19 00:00:38,219 --> 00:00:40,319 Management Commands and Commands. 20 00:00:40,799 --> 00:00:42,929 Historically, before in Docker, 21 00:00:42,989 --> 00:00:46,529 there were only Commands. But as 22 00:00:46,529 --> 00:00:48,959 you see here on this diagram, list 23 00:00:48,989 --> 00:00:52,259 of commands is very large. And as 24 00:00:52,289 --> 00:00:54,479 soon as the list of Docker commands 25 00:00:54,479 --> 00:00:56,699 became very large, Docker 26 00:00:56,729 --> 00:00:59,309 developers have decided to split 27 00:00:59,309 --> 00:01:01,469 those commands into Management 28 00:01:01,469 --> 00:01:04,199 Commands. And now there are several 29 00:01:04,229 --> 00:01:06,509 Management Commands available like, 30 00:01:06,539 --> 00:01:09,929 container, context, image, network, 31 00:01:09,989 --> 00:01:12,569 node, plugin, and so on. And 32 00:01:12,569 --> 00:01:14,609 basically, along with Management 33 00:01:14,609 --> 00:01:16,559 Commands, you are able to use 34 00:01:16,589 --> 00:01:18,509 additional commands. It means that 35 00:01:18,509 --> 00:01:20,099 Management Commands require 36 00:01:20,159 --> 00:01:21,989 additional commands as arguments. 37 00:01:22,529 --> 00:01:24,389 Let me now quickly go to terminal 38 00:01:24,419 --> 00:01:26,159 and show you those commands in 39 00:01:26,159 --> 00:01:29,309 practice. 'docker', and you should get 40 00:01:29,309 --> 00:01:31,229 the list of all available commands 41 00:01:31,259 --> 00:01:33,989 with short descriptions. And if you 42 00:01:34,019 --> 00:01:35,759 scroll up to the beginning of this 43 00:01:35,759 --> 00:01:37,889 output, you'll see Management 44 00:01:37,919 --> 00:01:41,009 Commands block. For example, using 45 00:01:41,729 --> 00:01:44,039 'image' Management Command, you are 46 00:01:44,039 --> 00:01:48,119 able to manage images. Using 'secret' 47 00:01:48,119 --> 00:01:49,769 command, you're able to manage 48 00:01:49,769 --> 00:01:52,049 Docker secrets. Using 'volume' 49 00:01:52,079 --> 00:01:54,029 Management Command, you're able to 50 00:01:54,059 --> 00:01:57,629 manage volumes. Also below you'll 51 00:01:57,629 --> 00:01:59,939 see a list of Commands. And those 52 00:01:59,939 --> 00:02:01,799 commands basically don't require 53 00:02:01,829 --> 00:02:03,749 additional arguments, but some of 54 00:02:03,749 --> 00:02:05,969 them have available options and 55 00:02:05,969 --> 00:02:07,109 you're able to supply some 56 00:02:07,109 --> 00:02:08,669 additional arguments as options. 57 00:02:08,969 --> 00:02:11,189 For example, there are such kind of 58 00:02:11,189 --> 00:02:14,669 commands as exec, export, images. 59 00:02:14,759 --> 00:02:16,889 With 'images' command, you're able to 60 00:02:16,889 --> 00:02:19,289 list images that exist in your 61 00:02:19,319 --> 00:02:22,409 local cache. With for example, 'ps' 62 00:02:22,409 --> 00:02:24,329 command, you're able to list the 63 00:02:24,359 --> 00:02:26,039 containers that are currently 64 00:02:26,039 --> 00:02:29,249 running. That's the commands that 65 00:02:29,279 --> 00:02:31,889 you could use. Alright, next, let 66 00:02:31,889 --> 00:02:34,019 me explain you how you're able to 67 00:02:34,049 --> 00:02:36,239 get help about a specific command. 68 00:02:36,599 --> 00:02:38,819 Let me clear a terminal, Command K. 69 00:02:38,999 --> 00:02:42,610 And here type 'docker ps --help'. 70 00:02:42,610 --> 00:02:44,459 'ps' is a regular command, 71 00:02:44,459 --> 00:02:46,259 it is not a Management Command. And 72 00:02:46,289 --> 00:02:48,359 let's press Enter. And here in this 73 00:02:48,389 --> 00:02:50,729 output, you'll see which options 74 00:02:50,849 --> 00:02:52,829 you are able to use along with 75 00:02:52,859 --> 00:02:56,159 'docker ps' command. There are short 76 00:02:56,159 --> 00:02:58,200 versions of every option like 77 00:02:58,200 --> 00:03:00,900 '-a', and there are also long versions 78 00:03:00,929 --> 00:03:04,289 of every option like '--all'. And 79 00:03:04,319 --> 00:03:07,109 if some longer options have 80 00:03:07,169 --> 00:03:09,389 available shortcuts, then they will 81 00:03:09,389 --> 00:03:11,669 be listed on the same line, like 82 00:03:11,699 --> 00:03:14,529 this option, '-a', or '--all'. 83 00:03:14,529 --> 00:03:16,169 And with this option, 84 00:03:16,169 --> 00:03:17,729 you're able for example, to show 85 00:03:17,759 --> 00:03:20,099 all containers including stopped 86 00:03:20,099 --> 00:03:22,499 containers. In the same way you're 87 00:03:22,499 --> 00:03:24,599 able to get help about Management 88 00:03:24,599 --> 00:03:26,789 Commands. For example, if I'll type 89 00:03:26,819 --> 00:03:29,819 'docker container --help'. 90 00:03:30,539 --> 00:03:32,369 And in this output, you'll see a 91 00:03:32,399 --> 00:03:35,339 list of available sub-commands that 92 00:03:35,339 --> 00:03:37,229 you're able to use along with 93 00:03:37,259 --> 00:03:39,449 'docker container' Management 94 00:03:39,449 --> 00:03:41,909 Command, like attach, commit, 95 00:03:41,909 --> 00:03:44,999 cp, create, diff, and so on. If you 96 00:03:44,999 --> 00:03:46,919 want to get help about specific 97 00:03:47,129 --> 00:03:49,559 command for Management Command, you 98 00:03:49,559 --> 00:03:52,529 need to type this sub-command after 99 00:03:52,529 --> 00:03:54,659 Management Command like this, 'docker 100 00:03:54,659 --> 00:03:57,599 container', let's say I want to get 101 00:03:57,599 --> 00:04:00,389 help about 'wait' command, 'wait', and 102 00:04:00,389 --> 00:04:02,891 next I will add option '--help'. 103 00:04:02,891 --> 00:04:05,369 And here in this output, 104 00:04:05,369 --> 00:04:07,769 you'll see basically help for this 105 00:04:07,799 --> 00:04:09,689 specific command that you can use 106 00:04:09,719 --> 00:04:11,159 along with this 'container' 107 00:04:11,189 --> 00:04:13,259 Management Command. And you'll see 108 00:04:13,259 --> 00:04:16,079 that this 'wait' command will, 'Block 109 00:04:16,259 --> 00:04:18,209 until one or more containers stop, 110 00:04:18,269 --> 00:04:20,759 then print their exit codes'. Also, 111 00:04:20,759 --> 00:04:22,858 let's have a look at the help for 112 00:04:22,858 --> 00:04:26,159 example for 'rm' command. 'docker 113 00:04:26,668 --> 00:04:30,569 container rm --help'. And 114 00:04:30,569 --> 00:04:32,489 you'll see that this sub-command 115 00:04:32,579 --> 00:04:34,259 has basically some additional 116 00:04:34,259 --> 00:04:37,109 available options like '-f' or 117 00:04:37,139 --> 00:04:39,740 '--force'; '-l' or 118 00:04:39,740 --> 00:04:42,272 '--link', and '-v' or 119 00:04:42,272 --> 00:04:45,149 '--volumes'. Alright, that's how 120 00:04:45,149 --> 00:04:46,979 you're able to get help about 121 00:04:47,009 --> 00:04:48,719 Docker Commands and Docker 122 00:04:48,749 --> 00:04:51,359 Management Commands. But basically 123 00:04:51,359 --> 00:04:53,459 some of Docker Commands are 124 00:04:53,519 --> 00:04:55,859 redundant to Docker Management 125 00:04:55,859 --> 00:04:57,749 Commands. And let me talk about 126 00:04:57,749 --> 00:05:00,232 that in the next lecture. I'll see there. Bye-Bye. 127 00:05:00,232 --> 00:05:02,890 [no audio]