1 00:00:00,001 --> 00:00:01,000 [No Audio] 2 00:00:01,000 --> 00:00:03,567 Everyone gets tired of command lines and terminal 3 00:00:03,567 --> 00:00:06,801 screens at some point in their life. That's where 4 00:00:06,801 --> 00:00:10,267 we need GUI applications. Docker provides a 5 00:00:10,267 --> 00:00:13,734 feature rich GUI with its Enterprise Edition, and 6 00:00:13,734 --> 00:00:17,667 it is called UCP. But since this course is free, 7 00:00:17,667 --> 00:00:20,067 and it only covers content, which is free to 8 00:00:20,067 --> 00:00:23,234 access and set up, we will use a third-party GUI 9 00:00:23,234 --> 00:00:25,034 for Docker called Kitematic. 10 00:00:25,034 --> 00:00:27,034 [No Audio] 11 00:00:27,034 --> 00:00:31,667 Kitematic is a well made open source GUI application for Docker, which 12 00:00:31,667 --> 00:00:34,267 supports single host Docker instances at the 13 00:00:34,267 --> 00:00:38,001 moment. Without further talk, let's jump straight 14 00:00:38,001 --> 00:00:41,334 to its GitHub page where we can download its binaries. 15 00:00:41,334 --> 00:00:43,767 [No Audio] 16 00:00:43,767 --> 00:00:45,767 Go to your favorite web browser and 17 00:00:45,767 --> 00:00:47,634 navigate to this address. 18 00:00:48,434 --> 00:00:53,001 As you can see, Kitematic is available for all popular platforms like 19 00:00:53,001 --> 00:00:56,267 Windows and Linux. We will download binaries for 20 00:00:56,267 --> 00:00:59,167 Ubuntu Linux, the current version of Kitematic 21 00:00:59,201 --> 00:01:03,067 is 0.17.3 which might have been updated 22 00:01:03,067 --> 00:01:04,801 by the time you're watching the course. 23 00:01:05,967 --> 00:01:09,434 Once the downloading process is complete, let's head to 24 00:01:09,434 --> 00:01:11,867 Downloads directory on our host machine. 25 00:01:12,634 --> 00:01:17,901 Let's extract it here. As we go deeper, we will see a 26 00:01:17,901 --> 00:01:21,734 tar inside the tar so let's extract that too. 27 00:01:23,434 --> 00:01:27,001 Finally, we have a tar file called data which 28 00:01:27,001 --> 00:01:28,934 needs to be extracted as well. 29 00:01:29,458 --> 00:01:32,334 I know too much extractions right. 30 00:01:32,667 --> 00:01:34,667 Inside data, we have directory 31 00:01:34,667 --> 00:01:38,801 called bin which contains the executable called kitematic. 32 00:01:38,801 --> 00:01:42,234 Simply double click on it and kitematic GUI 33 00:01:42,234 --> 00:01:44,167 will be up and running. 34 00:01:44,167 --> 00:01:47,267 [No Audio] 35 00:01:47,267 --> 00:01:50,967 Just to give you a brief understanding, Kitematic talks to both 36 00:01:50,967 --> 00:01:54,267 Docker Host and Docker Hub. The GUI is pretty 37 00:01:54,267 --> 00:01:57,301 simple and interactive. It is easy to predict at 38 00:01:57,301 --> 00:02:00,434 this stage that these are the repos on Docker Hub 39 00:02:00,434 --> 00:02:04,434 along with their pulls. But let's not go too fast. 40 00:02:04,501 --> 00:02:07,234 This homepage has a lot to offer. 41 00:02:08,300 --> 00:02:12,601 First of all, we have the LOGIN option which allows us to link our 42 00:02:12,601 --> 00:02:16,334 Docker Hub account to Kitematic. Then we have a 43 00:02:16,334 --> 00:02:19,534 big search bar for Docker images, which are 44 00:02:19,534 --> 00:02:23,734 fetched from Docker Hub. Then, we have recommended 45 00:02:23,734 --> 00:02:27,834 or featured images. On the right side, we have 46 00:02:27,867 --> 00:02:32,067 tabs like My Repos and My Images. My Repos show 47 00:02:32,067 --> 00:02:35,167 repos on your current Docker Hub account, it will 48 00:02:35,167 --> 00:02:38,167 show nothing since we haven't synced them yet. 49 00:02:38,167 --> 00:02:42,234 In other words, this is just a plain GUI with no 50 00:02:42,234 --> 00:02:44,634 Docker Hub account linked to it yet. 51 00:02:45,334 --> 00:02:49,167 My Images will show images available on our local host 52 00:02:49,167 --> 00:02:53,267 machine. If you notice, these images from various 53 00:02:53,267 --> 00:02:55,467 modules do look quite familiar. 54 00:02:56,601 --> 00:03:01,401 On the lower end of the left side, we have a small gear icon, which 55 00:03:01,401 --> 00:03:04,534 represents app settings. You can customize them 56 00:03:04,534 --> 00:03:07,701 the way you want. We will keep them as they are. 57 00:03:07,901 --> 00:03:10,901 Then we have a chat tool, which we don't need at 58 00:03:10,901 --> 00:03:14,601 this point of time. And finally, we have a link to 59 00:03:14,601 --> 00:03:18,567 Docker CLI. Clicking this will open a terminal 60 00:03:18,567 --> 00:03:20,901 window for us to use Docker commands. 61 00:03:21,471 --> 00:03:22,701 Let's close it. 62 00:03:23,567 --> 00:03:26,201 We have a list of recommended images by Docker 63 00:03:26,201 --> 00:03:29,134 on our screen, and we can create a container based 64 00:03:29,134 --> 00:03:32,034 on any image available here with a single click. 65 00:03:32,034 --> 00:03:36,067 Isn't it amazing? Let's check out how we can do it. 66 00:03:36,567 --> 00:03:39,801 We will select hello-world-nginx image, which 67 00:03:39,801 --> 00:03:42,434 is a lightweighted customized nginx image to 68 00:03:42,434 --> 00:03:44,701 demonstrate features of Kitematic. 69 00:03:45,734 --> 00:03:49,434 At the bottom of hello-world-nginx, we have the number of 70 00:03:49,434 --> 00:03:52,634 downloads and likes for the image on the left side 71 00:03:52,634 --> 00:03:54,934 and a create button on the right side. 72 00:03:56,101 --> 00:03:59,634 Let's click on the CREATE button to create and run a container 73 00:03:59,634 --> 00:04:01,101 based on this image. 74 00:04:02,034 --> 00:04:04,167 And there you go, Docker is 75 00:04:04,167 --> 00:04:06,434 connecting to Docker Hub to download the image 76 00:04:06,434 --> 00:04:11,601 hello-world-nginx, because it is not available on our local registry. 77 00:04:12,088 --> 00:04:14,767 It might take some time to download the image. 78 00:04:15,267 --> 00:04:17,166 After the process completes, 79 00:04:17,166 --> 00:04:19,901 our container will be created successfully. 80 00:04:20,233 --> 00:04:23,434 You must have noticed the CONTAINER LOGS screen here. 81 00:04:23,801 --> 00:04:26,334 It will show log outputs of the current running 82 00:04:26,334 --> 00:04:29,601 containers. We have 0 number of logs for hello-world 83 00:04:29,601 --> 00:04:32,867 container for now, because it has just been created. 84 00:04:33,367 --> 00:04:35,234 You might as well remember the difference 85 00:04:35,234 --> 00:04:38,267 between Created and Running states of a container. 86 00:04:39,001 --> 00:04:41,967 When the container is created, it won't 87 00:04:41,967 --> 00:04:45,034 have any logs. But as soon as it gets running, 88 00:04:45,134 --> 00:04:47,367 we'll have some logs of our container. 89 00:04:48,801 --> 00:04:51,334 On the left side of the container log screen, 90 00:04:51,434 --> 00:04:54,467 there is a list of running and stopped containers. 91 00:04:54,534 --> 00:04:58,767 It even includes those containers which are not started by Kitematic. 92 00:04:59,534 --> 00:05:01,467 We do do not have any pre running 93 00:05:01,467 --> 00:05:03,867 or stopped containers at this point of time. 94 00:05:03,934 --> 00:05:07,667 So the only available container is hello-world-nginx. 95 00:05:09,234 --> 00:05:11,701 We also have the volume section at the 96 00:05:11,701 --> 00:05:14,367 bottom right corner of the screen. It is the 97 00:05:14,367 --> 00:05:17,734 volume website_files, which is mount on our 98 00:05:17,734 --> 00:05:19,634 running container hello world. 99 00:05:20,434 --> 00:05:24,534 We can enable the volume in order to edit the file stored in it. 100 00:05:24,667 --> 00:05:28,334 Let's click on Enable Volumes and see what happens. 101 00:05:29,901 --> 00:05:31,967 We have been directed to the path 102 00:05:32,434 --> 00:05:37,567 Home/Documents/Kitematic/hello-world-nginx 103 00:05:37,567 --> 00:05:39,034 on our local machine. 104 00:05:39,034 --> 00:05:41,067 [No Audio] 105 00:05:41,067 --> 00:05:42,734 Kitematic has exposed 106 00:05:42,734 --> 00:05:46,067 the containers volume as a directory on our local 107 00:05:46,067 --> 00:05:50,301 machine, which allows the users to access it easily. 108 00:05:51,001 --> 00:05:54,567 As we access the volume website_files, 109 00:05:54,567 --> 00:05:57,534 we can see the default index.html. 110 00:05:58,167 --> 00:06:01,434 One important thing to notice here is, as soon as we 111 00:06:01,434 --> 00:06:04,867 enabled volumes for editing, the nginx containers 112 00:06:04,867 --> 00:06:08,434 stopped running. It was removed and restarted with 113 00:06:08,434 --> 00:06:11,867 a new volume flag to reflect any changes made in 114 00:06:11,867 --> 00:06:16,001 the volumes. We have not made any changes in the volume here. 115 00:06:16,501 --> 00:06:18,934 Above volumes on the top right 116 00:06:18,934 --> 00:06:23,001 corner, we have WEB PREVIEW section. It will allow 117 00:06:23,001 --> 00:06:26,734 us to see the containers result on our web browser. 118 00:06:26,967 --> 00:06:30,734 Let's maximize the web preview to have a good look at it. 119 00:06:32,201 --> 00:06:34,701 hello-world-nginx container is 120 00:06:34,701 --> 00:06:39,634 running on localhost port 32769. Let's get back to 121 00:06:39,634 --> 00:06:43,934 Kitematic and verify the results using Docker CLI on its terminal. 122 00:06:44,767 --> 00:06:47,334 Type docker ps -a 123 00:06:47,567 --> 00:06:50,901 to list out all of the running and stopped containers. 124 00:06:50,901 --> 00:06:54,834 The result reassures that hello-world-nginx container 125 00:06:54,834 --> 00:06:57,567 is running successfully on the same port. 126 00:06:58,934 --> 00:07:02,201 Let's return to Kitematic and stop the container. 127 00:07:02,201 --> 00:07:05,101 As we can see, there are multiple icons available 128 00:07:05,101 --> 00:07:08,101 exactly above the container log section. We have 129 00:07:08,101 --> 00:07:12,267 STOP, RESTART, EXEC and DOCS icons here. 130 00:07:13,067 --> 00:07:17,067 And as their name suggests, STOP and RESTART icons are 131 00:07:17,067 --> 00:07:21,467 used to stop and restart containers. EXEC icon is 132 00:07:21,467 --> 00:07:25,001 used to execute a command on a running container. 133 00:07:25,334 --> 00:07:28,934 DOCS icon will direct us to Docker documentation. 134 00:07:29,434 --> 00:07:31,267 Our container has been stopped. 135 00:07:32,267 --> 00:07:36,567 Navigate to the left side of the screen where all containers are listed. 136 00:07:36,567 --> 00:07:39,067 We want to delete this container. 137 00:07:39,267 --> 00:07:43,067 So click on the cross icon to remove the container. 138 00:07:43,434 --> 00:07:46,834 A dialog box will pop up to ask your confirmation 139 00:07:46,834 --> 00:07:50,401 about deletion process. Press Remove and our 140 00:07:50,401 --> 00:07:54,034 container has been deleted and we are back to homescreen. 141 00:07:54,301 --> 00:07:56,201 We can also search for a particular 142 00:07:56,201 --> 00:07:58,967 image here, it is similar to Docker search command. 143 00:07:59,467 --> 00:08:01,967 Just type the name of the Docker Image that you 144 00:08:01,967 --> 00:08:05,701 want to search.We will search for the image of Docker 145 00:08:05,701 --> 00:08:10,301 registry itself, so we'll type registry and press enter. 146 00:08:10,967 --> 00:08:13,467 We got all the Docker Images which include 147 00:08:13,467 --> 00:08:16,767 registry in their names. The first result is the 148 00:08:16,767 --> 00:08:20,734 official Docker registry image with 419 million 149 00:08:20,734 --> 00:08:24,701 downloads. Just like hello-world-nginx, we can play 150 00:08:24,701 --> 00:08:27,867 around with this or any other images as well. 151 00:08:27,867 --> 00:08:32,034 So this was Kitematic, the Docker GUI. You can play 152 00:08:32,034 --> 00:08:34,667 around with it further and you can even link your 153 00:08:34,667 --> 00:08:37,801 own Docker Hub account to use it interactively.