{"id":29775,"date":"2015-11-09T16:18:02","date_gmt":"2015-11-09T10:48:02","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=29775"},"modified":"2016-12-19T15:02:51","modified_gmt":"2016-12-19T09:32:51","slug":"docker-user-interface-simple-docker-ui","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/docker-user-interface-simple-docker-ui\/","title":{"rendered":"Docker User Interface using Simple Docker UI App"},"content":{"rendered":"<p>I have always loved using Docker the traditional way. Running commands like <strong>docker run<\/strong> etc. has been <a href=\"http:\/\/www.tothenew.com\/devops-chef-puppet-docker\">the way we use Docker<\/a>. While surfing the internet, I found this chrome app which can be downloaded and installed via google chrome and easily be used for getting a user-interface for your Docker Engine. It simplifies the way we use Docker. Now, we can use Docker by clicks rather than commands. &#8220;<strong>Docker Simplified<\/strong>&#8221;<\/p>\n<h3>Use-Case<\/h3>\n<p>Simply finding a Docker User Interface tool which is easy to use. I found this on google:<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29776\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/11\/Screenshot-from-2015-11-08-124842.png\" alt=\"Screenshot from 2015-11-08 12:48:42\" width=\"978\" height=\"617\" \/><br \/>\nYou can find it here: <a href=\"https:\/\/chrome.google.com\/webstore\/detail\/simple-docker-ui\/jfaelnolkgonnjdlkfokjadedkacbnib?hl=en\">Link<\/a><\/p>\n<p>It is a web interface that allows you to interact with the Docker Remote API. It\u2019s written in JAVA Script using the AngularJS framework. So, Let&#8217;s see how to install it for Docker running on your local machine. You can follow these steps for any remote server too.<\/p>\n<h3>Installation Steps<\/h3>\n<p>1. Go to the link I have shared above in the Chrome browser. Then click on ADD TO CHROME:<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-29777\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/11\/Screenshot-from-2015-11-08-130127.png\" alt=\"Screenshot from 2015-11-08 13:01:27\" width=\"691\" height=\"433\" \/>You can find it here as well after adding to chrome that is by typing the following in your chrome address bar:\u00a0<strong>chrome:\/\/apps\/<\/strong><\/p>\n<h4>2. Next, you need to make some changes<\/h4>\n<p>You need to enable Docker Remote API and for that you need to edit<strong> \/etc\/default\/docker<\/strong> to allow connections adding (do this where your Docker Engine resides, can be your local machine or a remote server):<\/p>\n<p>[js]DOCKER_OPTS=&#8217;-H tcp:\/\/localhost:2375 -H unix:\/\/\/var\/run\/docker.sock'[\/js]<\/p>\n<h5>Note:\u00a0For secure usage, if you are accessing the Docker Engine present on the local machine then use localhost in the above line else use ISP&#8217;s IP when the Docker Engine in on a remote machine.<\/h5>\n<p>Restart the Docker service using:<\/p>\n<p>[js]sudo service docker restart[\/js]<\/p>\n<p>Open your browser and verify you can connect to http:\/\/localhost:2375\/_ping\u00a0 (there is an _ before ping in the URL)<\/p>\n<p>For connecting to a <strong>remote server<\/strong>\u00a0in the above URL just replace localhost with the server&#8217;s IP. You should get an <strong>OK<\/strong> message. Remember, you need to allow the server to listen at <strong>port 2375 to your IP(<\/strong>allow the IP in firewalls or security groups<strong>).<\/strong><\/p>\n<p>On the server if you enter the command:<\/p>\n<p><code>service docker status<\/code><\/p>\n<p>It should show the following:<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29784\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/11\/Screenshot-from-2015-11-08-134023.png\" alt=\"Screenshot from 2015-11-08 13:40:23\" width=\"811\" height=\"150\" \/><\/p>\n<h4>3. Once the above is done, click on LAUNCH APP:<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-29778 \" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/11\/Screenshot-from-2015-11-08-1248421.png\" alt=\"Screenshot from 2015-11-08 12:48:42\" width=\"626\" height=\"401\" \/><\/h4>\n<p>&nbsp;<\/p>\n<h3>Using Simple Docker UI<\/h3>\n<p>When you click on LAUNCH APP it will open something like:<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29781\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/11\/Screenshot-from-2015-11-08-132847.png\" alt=\"Screenshot from 2015-11-08 13:28:47\" width=\"1102\" height=\"486\" \/><\/p>\n<p>Make sure the changes you made to the default file I mentioned in installation step 2 are saved, Docker service has been restarted and the service is running. After this, click on &#8220;Verify&#8221;. It should say &#8220;Valid connection&#8221;. If it says that the connection of the Docker UI has been made to your local machine&#8217;s Docker Engine. Now, just click on save.<\/p>\n<h5>Note: Replace localhost by server IP for a remote server.<\/h5>\n<p>Let&#8217;s head to the home tab. Just click on &#8220;Home&#8221; on the top left corner. It will show display few things as in the below image:<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29782\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/11\/Screenshot-from-2015-11-08-134132.png\" alt=\"Screenshot from 2015-11-08 13:41:32\" width=\"1100\" height=\"488\" \/><br \/>\nThis is an overview of Docker on your local machine. It has the connections showing on the right side along with Docker and Docker UI version. In the center, it has an overview of running containers, All containers, and Images. Also, it has Event History in the bottom.<\/p>\n<p>Now, you can see all the containers clicking on either of the two container options showing (Running containers\/All containers) and it will take you the &#8220;Containers&#8221; tab adjacent to the &#8220;Home&#8221; tab. So, you can also go there by clicking on the &#8220;Containers&#8221; menu. Same is the case for &#8220;Images&#8221;.<\/p>\n<p>Lets, see what &#8220;Containers&#8221; menu has for us:<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29783\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/11\/Screenshot-from-2015-11-08-135357.png\" alt=\"Screenshot from 2015-11-08 13:53:57\" width=\"1094\" height=\"527\" \/><\/p>\n<p>So, it has all the containers listed, segregated into running and stopped\/exited. Let&#8217;s see what we can do here. Click on the running container&#8217;s container ID:<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29785\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/11\/Screenshot-from-2015-11-08-135628.png\" alt=\"Screenshot from 2015-11-08 13:56:28\" width=\"1104\" height=\"217\" \/><\/p>\n<p>It will open options as shown below:<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29786\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/11\/Screenshot-from-2015-11-08-135740.png\" alt=\"Screenshot from 2015-11-08 13:57:40\" width=\"1096\" height=\"672\" \/><br \/>\nIt gives you options like\u00a0<strong>Stop\u00a0<\/strong>and\u00a0<strong>Remove<\/strong>. (You would need to stop the container before removing\/deleting) it. Next, the main thing here it the TTY for the container. \u00a0You are inside the container and you can enter any command you want to execute inside the container:<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29787\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/11\/Screenshot-from-2015-11-08-140142.png\" alt=\"Screenshot from 2015-11-08 14:01:42\" width=\"1081\" height=\"426\" \/><br \/>\nSince the tool is still in Beta stage, sometimes when you type a command for eg. apt-get update it may show it on the screen like aapptt&#8211;ggeett uuppddaattee, but don&#8217;t worry it executes properly with no flaws:<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29788\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/11\/Screenshot-from-2015-11-08-140443.png\" alt=\"Screenshot from 2015-11-08 14:04:43\" width=\"983\" height=\"517\" \/><\/p>\n<p>Next option available is <strong>Top\u00a0<\/strong>which shows the top processes running inside the container. Since, it is base Ubuntu image that I used to run this container it shows the following:<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29789\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/11\/Screenshot-from-2015-11-08-140521.png\" alt=\"Screenshot from 2015-11-08 14:05:21\" width=\"1066\" height=\"177\" \/><\/p>\n<p>Now, is the <strong>File system changes\u00a0<\/strong>option which shows the following which is self-explanatory:<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29790\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/11\/Screenshot-from-2015-11-08-141051.png\" alt=\"Screenshot from 2015-11-08 14:10:51\" width=\"1088\" height=\"211\" \/><\/p>\n<p>Let&#8217;s see what the\u00a0<strong>Images\u00a0<\/strong>menu has for us. It will show all the Docker images present on my local machine and allow me to launch new containers too:<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29791\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/11\/Screenshot-from-2015-11-08-144329.png\" alt=\"Screenshot from 2015-11-08 14:43:29\" width=\"1100\" height=\"334\" \/><\/p>\n<p>Click on the Image ID and something like below will pop out:<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29792\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/11\/Screenshot-from-2015-11-08-144500.png\" alt=\"Screenshot from 2015-11-08 14:45:00\" width=\"1087\" height=\"675\" \/><br \/>\nIt will show you options like <b>Start<\/b> and\u00a0<strong>Remove.\u00a0<\/strong>It will also show the\u00a0<strong>CMD, ENV\u00a0<\/strong>and\u00a0<strong>WorkingDir.\u00a0<\/strong>Here they are empty as this is a base Ubuntu image. Along with all that on the right-hand side it shows\u00a0<strong>Container exposed ports, Author, OS and creation date.\u00a0<\/strong>At last, in the bottom it shows the creation history of the Docker image.<\/p>\n<p>Let&#8217;s roll up a Docker container now. Just click on\u00a0<strong>Start:<br \/>\n<\/strong><strong><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-29794 size-full\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/11\/Screenshot-from-2015-11-08-145500.png\" alt=\"Screenshot from 2015-11-08 14:55:00\" width=\"595\" height=\"448\" \/><\/strong><\/p>\n<p>So, there are basic options like:<br \/>\n<strong>Container\u00a0<\/strong><strong>Name, Command(CMD), stdin\/stdout (-i and -t switch)\u00a0<\/strong>and\u00a0<strong>Ports to expose\u00a0<\/strong>(All, Custom and None). Select these options and then there are two more important options that it gives:\u00a0<strong>Volumes\u00a0<\/strong>and\u00a0<strong>Environments.\u00a0<\/strong> We can go through these options one by one:<\/p>\n<p><strong>Volumes:<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-29795 size-full\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/11\/Screenshot-from-2015-11-08-154024.png\" alt=\"Screenshot from 2015-11-08 15:40:24\" width=\"597\" height=\"465\" \/><br \/>\n<\/strong>It will make the <strong>\/mnt\/code<\/strong> directory available inside the container at<strong> \/opt\/code<\/strong>. If the \/opt\/code directory does not exist Docker will create one.<\/p>\n<p>Now, you can also input environment variables by clicking on the\u00a0<strong>Environments\u00a0<\/strong>option:<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-29796 size-full\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/11\/Screenshot-from-2015-11-08-154259.png\" alt=\"Screenshot from 2015-11-08 15:42:59\" width=\"594\" height=\"590\" \/><br \/>\nI have used a random variable for example. After this just click on run.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29797\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/11\/Screenshot-from-2015-11-08-154800.png\" alt=\"Screenshot from 2015-11-08 15:48:00\" width=\"1080\" height=\"474\" \/><\/p>\n<p>The container is up and running. So, that is how easy it is to use Docker with Simple Docker UI. Anyone having even little knowledge about Docker can use this app and make full use of Docker with a couple of clicks. Hopefully, more features will be added to the app very soon and I will be back with another blog on the same.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have always loved using Docker the traditional way. Running commands like docker run etc. has been the way we use Docker. While surfing the internet, I found this chrome app which can be downloaded and installed via google chrome and easily be used for getting a user-interface for your Docker Engine. It simplifies the [&hellip;]<\/p>\n","protected":false},"author":174,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":16},"categories":[1174,1],"tags":[248,2734,1916,1891,1883,2594,2729,2730,2732,2733,379,2735,2731],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/29775"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/174"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=29775"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/29775\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=29775"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=29775"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=29775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}