{"id":71137,"date":"2017-12-11T19:00:45","date_gmt":"2017-12-11T17:00:45","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=71137"},"modified":"2023-12-11T10:30:18","modified_gmt":"2023-12-11T08:30:18","slug":"docker-java-developers-develop-docker","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2017\/12\/docker-java-developers-develop-docker.html","title":{"rendered":"Docker for Java Developers: Develop on Docker"},"content":{"rendered":"<p><em>This article is part of our Academy Course titled <a href=\"https:\/\/www.javacodegeeks.com\/2018\/02\/docker-tutorial-java-developers.html\">Docker Tutorial for Java Developers<\/a>.<\/p>\n<p>In this course, we provide a series of tutorials so that you can develop your own Docker based applications. We cover a wide range of topics, from Docker over command line, to development, testing, deployment and continuous integration. With our straightforward tutorials, you will be able to get your own projects up and running in minimum time. Check it out <a href=\"https:\/\/www.javacodegeeks.com\/2018\/02\/docker-tutorial-java-developers.html\">here<\/a>!<\/em><\/p>\n<div class=\"toc\">\n<h3>Table Of Contents<\/h3>\n<dl>\n<dt><a href=\"#introduction\">1. Introduction<\/a><\/dt>\n<dt><a href=\"#ide\">2. Docker from your IDE<\/a><\/dt>\n<dd>\n<dl>\n<dt><a href=\"#eclipse\">2.1. Eclipse<\/a><\/dt>\n<dt><a href=\"#idea\">2.2. IntelliJ IDEA<\/a><\/dt>\n<dt><a href=\"#netbeans\">2.3. Oracle NetBeans<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dt><a href=\"#docker\">3. On the Edge: Your IDE in Docker<\/a><\/dt>\n<dt><a href=\"#debug\">4. So What About Debugging?<\/a><\/dt>\n<dt><a href=\"#management\">5. Management and Monitoring<\/a><\/dt>\n<dd>\n<dl>\n<dt><a href=\"#portainer\">5.1. Portainer<\/a><\/dt>\n<dt><a href=\"#cadvisor\">5.2. cAdvisor<\/a><\/dt>\n<dt><a href=\"#ctop\">5.3. ctop<\/a><\/dt>\n<dt><a href=\"#more\">5.4. And a lot more &#8230;<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dt><a href=\"#metrics\">6. Docker Engine Metrics<\/a><\/dt>\n<dt><a href=\"#conclusions\">7. Conclusions<\/a><\/dt>\n<dt><a href=\"#next\">8. What\u2019s next<\/a><\/dt>\n<\/dl>\n<\/div>\n<h2><a name=\"introduction\"><\/a>1. Introduction<\/h2>\n<p>In the <a href=\"https:\/\/www.javacodegeeks.com\/2017\/11\/docker-java-developers-build-docker.html\">last part of the tutorial<\/a> we learned a number of ways to package (and run) Java applications as <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> containers. In this part we are going to focus more on how <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> impacts our development practices in a quite positive ways.<\/p>\n<p>Fairly speaking, there are a lot of areas where <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> could be very helpful for developers. The emphasis of our discussion will be made on <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> integration with <a href=\"https:\/\/en.wikipedia.org\/wiki\/Integrated_development_environment\">IDE<\/a>s, running <a href=\"https:\/\/en.wikipedia.org\/wiki\/Integrated_development_environment\">IDE<\/a>s as <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> containers and getting to know a couple of useful tools for managing and monitoring your <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> environments.<\/p>\n<h2><a name=\"ide\"><\/a>2. Docker from your IDE<\/h2>\n<p>As we have seen so far, <a href=\"https:\/\/www.docker.com\/\">Docker<\/a>\u2019s command line tools are very powerful and their usage is pretty straightforward. However, most of us, developers, spend major part of the day in our favorite <a href=\"https:\/\/en.wikipedia.org\/wiki\/Integrated_development_environment\">IDE<\/a>. Switching between dozens of windows and terminals in the middle of the debugging session while hunting for a hard to reproduce bug in the application logic could be quite counterproductive.<\/p>\n<p>Luckily, all three leading Java development <a href=\"https:\/\/en.wikipedia.org\/wiki\/Integrated_development_environment\">IDE<\/a>s, namely <a href=\"http:\/\/www.eclipse.org\/\">Eclipse<\/a>, <a href=\"https:\/\/www.jetbrains.com\/idea\/\">JetBrains IntelliJ IDEA<\/a> and <a href=\"https:\/\/netbeans.org\/\">NetBeans<\/a>, provide integration with <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> tooling through convenient UI views or\/and widgets. Let us quickly go over each of these <a href=\"https:\/\/en.wikipedia.org\/wiki\/Integrated_development_environment\">IDE<\/a>s and take a closer look on what one has to offer.<\/p>\n<h3><a name=\"eclipse\"><\/a>2.1. Eclipse<\/h3>\n<p><a href=\"https:\/\/projects.eclipse.org\/releases\/oxygen\">Eclipse Oxygen<\/a>, the latest released version of <a href=\"http:\/\/www.eclipse.org\/\">Eclipse<\/a> <a href=\"https:\/\/en.wikipedia.org\/wiki\/Integrated_development_environment\">IDE<\/a> as of this moment, has comprehensive <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> tooling support provided by <a href=\"https:\/\/www.eclipse.org\/linuxtools\/downloads.php\">Linux Tools<\/a> subproject (available as a plugin). Once installed, it contributes four additional views under <code>Docker<\/code> category.<\/p>\n<p><figure id=\"attachment_71140\" aria-describedby=\"caption-attachment-71140\" style=\"width: 245px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-eclipse-jcg.png\"><img decoding=\"async\" class=\"wp-image-71140 size-medium\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-eclipse-jcg-245x300.png\" alt=\"Docker Views in Eclipse\" width=\"245\" height=\"300\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-eclipse-jcg-245x300.png 245w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-eclipse-jcg.png 388w\" sizes=\"(max-width: 245px) 100vw, 245px\" \/><\/a><figcaption id=\"caption-attachment-71140\" class=\"wp-caption-text\">Docker Views in Eclipse<\/figcaption><\/figure><\/p>\n<p>Each of these views exposes some details about <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> containers or images, with <code>Docker Explorer<\/code> being all-in-one view of both.<\/p>\n<p><figure id=\"attachment_71145\" aria-describedby=\"caption-attachment-71145\" style=\"width: 252px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-explorer-jcg-1.png\"><img decoding=\"async\" class=\"size-medium wp-image-71145\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-explorer-jcg-1-252x300.png\" alt=\"Docker Explorer View\" width=\"252\" height=\"300\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-explorer-jcg-1-252x300.png 252w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-explorer-jcg-1.png 460w\" sizes=\"(max-width: 252px) 100vw, 252px\" \/><\/a><figcaption id=\"caption-attachment-71145\" class=\"wp-caption-text\">Docker Explorer View<\/figcaption><\/figure><\/p>\n<p>If you are interested just in <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> containers, there is a dedicated <code>Docker Containers<\/code> view, which uses compact, table-based representation.<\/p>\n<p><figure id=\"attachment_71148\" aria-describedby=\"caption-attachment-71148\" style=\"width: 620px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-containers-jcg.png\"><img decoding=\"async\" class=\"wp-image-71148 size-large\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-containers-jcg-1024x193.png\" alt=\"Docker Containers View\" width=\"620\" height=\"117\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-containers-jcg-1024x193.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-containers-jcg-300x56.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-containers-jcg-768x144.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-containers-jcg.png 1553w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/a><figcaption id=\"caption-attachment-71148\" class=\"wp-caption-text\">Docker Containers View<\/figcaption><\/figure><\/p>\n<p>Similarly, if you want to list only <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> images, the specialized <code>Docker Images<\/code> view is right here to serve your needs.<\/p>\n<p><figure id=\"attachment_71150\" aria-describedby=\"caption-attachment-71150\" style=\"width: 620px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-images-jcg.png\"><img decoding=\"async\" class=\"wp-image-71150 size-large\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-images-jcg-1024x201.png\" alt=\"Docker Images View\" width=\"620\" height=\"122\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-images-jcg-1024x201.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-images-jcg-300x59.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-images-jcg-768x150.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-images-jcg.png 1552w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/a><figcaption id=\"caption-attachment-71150\" class=\"wp-caption-text\">Docker Images View<\/figcaption><\/figure><\/p>\n<p>Last but not least, there is one very useful view called <code>Docker Image Hierarchy<\/code>. It allows to see all the layers the image in question has been built from. Here, for example, we could see how the tagged image with name <code>jcg\/spring-boot-webapp:0.0.1-SNAPSHOT<\/code> (one of the samples we were building in the previous part of the tutorial) is layered out.<\/p>\n<p><figure id=\"attachment_71152\" aria-describedby=\"caption-attachment-71152\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-image-hierarchy-jcg.png\"><img decoding=\"async\" class=\"wp-image-71152 size-medium\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-image-hierarchy-jcg-300x151.png\" alt=\"Docker Image Hierarchy\" width=\"300\" height=\"151\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-image-hierarchy-jcg-300x151.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-image-hierarchy-jcg.png 629w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-71152\" class=\"wp-caption-text\">Docker Image Hierarchy<\/figcaption><\/figure><\/p>\n<p>But these views are only the part of the whole story. Another part is a set of new <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> launchers which you may use to build <a href=\"https:\/\/www.docker.com\/\">Docker<\/a>\u00a0 images and run your Java applications (or even complete <a href=\"https:\/\/docs.docker.com\/compose\/reference\/overview\/\">Docker Compose<\/a> stacks) as <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> containers.<\/p>\n<p><figure id=\"attachment_71153\" aria-describedby=\"caption-attachment-71153\" style=\"width: 161px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/eclipse-launcher-jcg.png\"><img decoding=\"async\" class=\"wp-image-71153 size-medium\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/eclipse-launcher-jcg-161x300.png\" alt=\"Eclipse Launchers\" width=\"161\" height=\"300\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/eclipse-launcher-jcg-161x300.png 161w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/eclipse-launcher-jcg.png 408w\" sizes=\"(max-width: 161px) 100vw, 161px\" \/><\/a><figcaption id=\"caption-attachment-71153\" class=\"wp-caption-text\">Eclipse Launchers<\/figcaption><\/figure><div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>In case you would like to learn more about all the views and launchers discussed above, and, in general, about <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> tooling available in <a href=\"http:\/\/www.eclipse.org\/\">Eclipse<\/a>, the <a href=\"https:\/\/wiki.eclipse.org\/Linux_Tools_Project\/Docker_Tooling\/User_Guide\">official project Wiki<\/a> is a great place to get started.<\/p>\n<h3><a name=\"idea\"><\/a>2.2. IntelliJ IDEA<\/h3>\n<p>The <a href=\"https:\/\/www.jetbrains.com\/idea\/\">JetBrains IntelliJ IDEA<\/a>, available in latest version <code>2017.2.6<\/code>, provides the <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> tooling support in a form of the <a href=\"https:\/\/www.jetbrains.com\/help\/idea\/docker.html\">official plugin<\/a>. It is available in <code>Ultimate Edition<\/code> as well as in <code>Community Edition<\/code>, which we are going to use in this section.<\/p>\n<p>Once the plugin is installed, the new <code>Docker<\/code> view becomes available, with all the details about images and containers baked in.<\/p>\n<p><figure id=\"attachment_71157\" aria-describedby=\"caption-attachment-71157\" style=\"width: 620px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-idea-jcg.png\"><img decoding=\"async\" class=\"wp-image-71157 size-large\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-idea-jcg-1024x208.png\" alt=\"Docker in IntelliJ Idea\" width=\"620\" height=\"126\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-idea-jcg-1024x208.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-idea-jcg-300x61.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-idea-jcg-768x156.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-idea-jcg.png 1919w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/a><figcaption id=\"caption-attachment-71157\" class=\"wp-caption-text\">Docker in IntelliJ Idea<\/figcaption><\/figure><\/p>\n<p>To be fair, having a single, nicely structured view with most of the required pieces available nearby (in the different tabs) is very convenient.<\/p>\n<h3><a name=\"netbeans\"><\/a>2.3. Oracle NetBeans<\/h3>\n<p>The <a href=\"https:\/\/netbeans.org\/\">NetBeans<\/a> since the latest <code>8.2<\/code> release has <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> tooling included as part of the <code>Base IDE<\/code> plugin (which you very likely would have activated from the start). After the plugin activation, the addition <code>Docker<\/code> tree node becomes available in the <code>Services<\/code> view.<\/p>\n<p><figure id=\"attachment_71182\" aria-describedby=\"caption-attachment-71182\" style=\"width: 283px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-netbeans-jcg.png\"><img decoding=\"async\" class=\"size-medium wp-image-71182\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-netbeans-jcg-283x300.png\" alt=\"Docker in Netbeans\" width=\"283\" height=\"300\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-netbeans-jcg-283x300.png 283w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/docker-netbeans-jcg.png 493w\" sizes=\"(max-width: 283px) 100vw, 283px\" \/><\/a><figcaption id=\"caption-attachment-71182\" class=\"wp-caption-text\">Docker in Netbeans<\/figcaption><\/figure><\/p>\n<p>A quite nice summary and discussions about desired features regarding <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> integration in <a href=\"https:\/\/netbeans.org\/\">NetBeans<\/a> has been published on <a href=\"http:\/\/wiki.netbeans.org\/Docker\">official community Wiki<\/a>. Please check it out if you are curious or interested in this topic.<\/p>\n<h2><a name=\"docker\"><\/a>3. On the Edge: Your IDE in Docker<\/h2>\n<p>As we have seen, the <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> tooling provided by most popular Java development <a href=\"https:\/\/en.wikipedia.org\/wiki\/Integrated_development_environment\">IDE<\/a>s is quite sufficient, one may say even outstanding. But what if we try to push the limits and run our <a href=\"https:\/\/en.wikipedia.org\/wiki\/Integrated_development_environment\">IDE<\/a> completely in <a href=\"https:\/\/www.docker.com\/\">Docker<\/a>, literally anywhere? If it sounds a bit crazy, it surely does, but \u2026<\/p>\n<p><a href=\"https:\/\/www.eclipse.org\/che\/\">Eclipse Che<\/a>, the next-generation <a href=\"https:\/\/en.wikipedia.org\/wiki\/Integrated_development_environment\">IDE<\/a> from <a href=\"http:\/\/www.eclipse.org\/\">Eclipse<\/a>, is leveraging containerization at full extent and runs completely on <a href=\"https:\/\/www.docker.com\/\">Docker<\/a>. Under the hood, it is powered by <a href=\"https:\/\/en.wikipedia.org\/wiki\/Representational_state_transfer\">REST(ful) web APIs<\/a> and provides feature-rich, browser-based <a href=\"https:\/\/en.wikipedia.org\/wiki\/Integrated_development_environment\">IDE<\/a>.<\/p>\n<p><figure id=\"attachment_71184\" aria-describedby=\"caption-attachment-71184\" style=\"width: 620px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/eclipse-che-jcg.png\"><img decoding=\"async\" class=\"wp-image-71184 size-large\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/eclipse-che-jcg-1024x500.png\" alt=\"Eclipse Che\" width=\"620\" height=\"303\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/eclipse-che-jcg-1024x500.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/eclipse-che-jcg-300x147.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/eclipse-che-jcg-768x375.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/eclipse-che-jcg.png 1920w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/a><figcaption id=\"caption-attachment-71184\" class=\"wp-caption-text\">Eclipse Che<\/figcaption><\/figure><\/p>\n<p>It is quite innovative and young project, with a tremendous potential to revolutionize the concepts of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Integrated_development_environment\">IDE<\/a>s as we know them. It would be very interesting to see how things are going to unfold in the future but the technology is already here, available for evaluation.<\/p>\n<h2><a name=\"debug\"><\/a>4. So What About Debugging?<\/h2>\n<p>Debugging was, is and very likely will be playing the crucial role in finding, understanding and resolving defects or problems in our programs. And, like it or not, no matter how awesome <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> is, it won\u2019t make our applications free from bugs. If you are running your Java applications as <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> containers, the debugging process changes a little bit, and is explained in great details in <a href=\"https:\/\/blog.docker.com\/2016\/09\/java-development-using-docker\/\">this excellent article<\/a>. It is so comprehensive that there no need to repeat it here, just pick the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Integrated_development_environment\">IDE<\/a> you use and go over handsome tutorials prepared for you.<\/p>\n<h2><a name=\"management\"><\/a>5. Management and Monitoring<\/h2>\n<p>Although <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> command line tools and, consequently, <a href=\"https:\/\/docs.docker.com\/engine\/api\/\">Docker Engine API<\/a>s, let you accomplish any task you may encounter, many of us still prefer to deal with some kind of web or graphical UIs. Obviously, this is a personal preference and in this section we are going to learn about quite a few interesting options in this regards.<\/p>\n<h3><a name=\"portainer\"><\/a>5.1. Portainer<\/h3>\n<p>The first tool we a going to look at is <a href=\"https:\/\/portainer.io\/\">Portainer<\/a>, an open-source lightweight management UI which allows to easily manage different <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> environments (like <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> hosts or <a href=\"https:\/\/docs.docker.com\/engine\/swarm\/\">Docker Swarm<\/a> clusters). It comes as no surprise that <a href=\"https:\/\/portainer.io\/\">Portainer<\/a> itself runs as a lightweight <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> container. Let us run one:<\/p>\n<pre class=\"brush:bash\">$ docker run -d -p 9000:9000 -v \/var\/run\/docker.sock:\/var\/run\/docker.sock portainer\/portainer\n<\/pre>\n<p>On Windows machine, the command looks a little bit different:<\/p>\n<pre class=\"brush:bash\">$ docker run -d -p 9000:9000 portainer\/portainer<\/pre>\n<p>Once the <a href=\"https:\/\/portainer.io\/\">Portainer<\/a> container is up and running, you will be able to access it through pretty neat web UI available at <a href=\"http:\/\/localhost:9000\">http:\/\/localhost:9000<\/a> (or, in case you are using non-native <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> installation, <code>http:\/\/&lt;docker-machine&gt;:9000<\/code>).<\/p>\n<p><figure id=\"attachment_71191\" aria-describedby=\"caption-attachment-71191\" style=\"width: 620px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/portainer-jcg.png\"><img decoding=\"async\" class=\"wp-image-71191 size-large\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/portainer-jcg-1024x413.png\" alt=\"Portainer Dashboard\" width=\"620\" height=\"250\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/portainer-jcg-1024x413.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/portainer-jcg-300x121.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/portainer-jcg-768x310.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/portainer-jcg.png 1920w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/a><figcaption id=\"caption-attachment-71191\" class=\"wp-caption-text\">Portainer Dashboard<\/figcaption><\/figure><\/p>\n<p>When the setup steps are completed (if necessary), you are going to be navigated to all-in-one view of the <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> environment in question, starting from the simple dashboard page. You will definitely recognize all the <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> objects (like volumes, networks, containers, images, \u2026) listed on the left so you could select any of those in order to be redirected to a dedicated view.<\/p>\n<p>The list of supported <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> features which <a href=\"https:\/\/portainer.io\/\">Portainer<\/a> exposes through the intuitive web interface is just astonishing. If you favor UI tools over command line ones, <a href=\"https:\/\/portainer.io\/\">Portainer<\/a> has all the chances to serve as the one-stop shop for you.<\/p>\n<h3><a name=\"cadvisor\"><\/a>5.2. cAdvisor<\/h3>\n<p>Often while we are developing our applications there is a need to get more insights regarding what is going on with our containers, either we are talking about CPU, memory or network utilization. Luckily, there are quite a few options here and one of the very useful tools we are going to talk about is <a href=\"https:\/\/github.com\/google\/cadvisor\">cAdvisor<\/a> (or in full version, container advisor) which analyzes the resource usage and performance characteristics of running containers.<\/p>\n<blockquote>\n<p>\u201c<a href=\"https:\/\/github.com\/google\/cadvisor\"><em>cAdvisor<\/em><\/a><em> provides container users an understanding of the resource usage and performance characteristics of their running containers. It is a running daemon that collects, aggregates, processes, and exports information about running containers. Specifically, for each container it keeps resource isolation parameters, historical resource usage, histograms of complete historical resource usage and network statistics. This data is exported by container and machine-wide.<\/em>\u201d &#8211; <a href=\"https:\/\/github.com\/google\/cadvisor\">https:\/\/github.com\/google\/cadvisor<\/a><\/p>\n<\/blockquote>\n<p>Interestingly, <a href=\"https:\/\/github.com\/google\/cadvisor\">cAdvisor<\/a> goes beyond just <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> and should support just about any other container type out of the box. Sadly for Windows users, <a href=\"https:\/\/github.com\/google\/cadvisor\">cAdvisor<\/a> has <a href=\"https:\/\/github.com\/google\/cadvisor\/issues\/1394\">limited support<\/a> on this platform. The best way to give the <a href=\"https:\/\/github.com\/google\/cadvisor\">cAdvisor<\/a> a try is, for sure, to run it as <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> container.<\/p>\n<pre class=\"brush:bash\">sudo docker run \\\n  --volume=\/:\/rootfs:ro \\\n  --volume=\/var\/run:\/var\/run:rw \\\n  --volume=\/sys:\/sys:ro \\\n  --volume=\/var\/lib\/docker\/:\/var\/lib\/docker:ro \\\n  --volume=\/dev\/disk\/:\/dev\/disk:ro \\\n  --publish=8080:8080 \\\n  --detach=true \\\n  --name=cadvisor \\\n  google\/cadvisor:latest\n<\/pre>\n<p>Once the container is up and running, you can access <a href=\"https:\/\/github.com\/google\/cadvisor\">cAdvisor<\/a> web UI at <a href=\"http:\/\/localhost:8080\">http:\/\/localhost:8080<\/a> (or, in case you are using non-native <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> installation, <code>http:\/\/&lt;docker-machine&gt;:8080<\/code>).<\/p>\n<p><figure id=\"attachment_71195\" aria-describedby=\"caption-attachment-71195\" style=\"width: 620px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/cadvisor-jcg.png\"><img decoding=\"async\" class=\"wp-image-71195 size-large\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/cadvisor-jcg-1024x803.png\" alt=\"cAdvisor\" width=\"620\" height=\"486\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/cadvisor-jcg-1024x803.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/cadvisor-jcg-300x235.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/cadvisor-jcg-768x602.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/cadvisor-jcg.png 1199w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/a><figcaption id=\"caption-attachment-71195\" class=\"wp-caption-text\">cAdvisor<\/figcaption><\/figure><\/p>\n<p>The web UI is quite simple but exceptionally informative. There are a lot of details collected about resources and processes of each running <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> container as well as about the <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> host machine itself (CPU, memory, network, storage, \u2026). By all means, it is invaluable tool to learn how your containers consume and manage the resources at runtime.<br \/>\n[ulp id=&#8217;MD25RnPuC2vrVItl&#8217;]<br \/>\n&nbsp;<\/p>\n<h3><a name=\"ctop\"><\/a>5.3. ctop<\/h3>\n<p>And last, but not least, we are going to wrap up with <a href=\"https:\/\/ctop.sh\">ctop<\/a> tool which, in a <a href=\"https:\/\/linux.die.net\/man\/1\/top\">top<\/a>-like interface, provides a concise and condensed overview of real-time metrics for multiple containers.<\/p>\n<p><figure id=\"attachment_71196\" aria-describedby=\"caption-attachment-71196\" style=\"width: 620px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/ctop-jcg.png\"><img decoding=\"async\" class=\"wp-image-71196 size-large\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/ctop-jcg-1024x214.png\" alt=\"ctop\" width=\"620\" height=\"130\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/ctop-jcg-1024x214.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/ctop-jcg-300x63.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/ctop-jcg-768x161.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/ctop-jcg.png 1396w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/a><figcaption id=\"caption-attachment-71196\" class=\"wp-caption-text\">ctop<\/figcaption><\/figure><\/p>\n<p>Not only <a href=\"https:\/\/ctop.sh\">ctop<\/a> has a summary view, it also supports the option to select and focus on any individual container as well.<\/p>\n<h3><a name=\"more\"><\/a>5.4. And a lot more &#8230;<\/h3>\n<p>The <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> tooling space is really thriving, with new interesting projects popping up literally every day. We have just covered a couple of well-known, mature and useful tools but there are a lot more to discover, so please watch this space closely if you are interested.<\/p>\n<h2><a name=\"metrics\"><\/a>6. Docker Engine Metrics<\/h2>\n<p><a href=\"https:\/\/www.docker.com\/\">Docker<\/a> engine exposes a lot of interesting metrics in the format which is fully compatible with <a href=\"https:\/\/prometheus.io\/\">Prometheus<\/a>, tremendously popular open-source monitoring and alerting solution. Although this feature became generally available quite a while ago, not many people know about it and as such, not many make use of it.<\/p>\n<p>This feature is still considered experimental so it is not available by default and needs a bit of configuration tweaking. The <a href=\"https:\/\/docs.docker.com\/engine\/admin\/prometheus\/\">official documentation<\/a> thoroughly describes all the necessary steps to be done with respect to the operating system you are running <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> on. But essentially, the first step is to modify <code>daemon.json<\/code> and add the following properties there.<\/p>\n<pre class=\"brush:bash\">{\n  \"metrics-addr\" : \"localhost:9323\",\n  \"experimental\" : true\n}\n<\/pre>\n<p>In order for this change to take effect, the <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> daemon should be restarted. Right after, the metrics should become available at the <a href=\"http:\/\/localhost:9323\/metrics\">http:\/\/localhost:9323\/metrics<\/a> endpoint. Next step is to prepare <a href=\"https:\/\/prometheus.io\/\">Prometheus<\/a> configuration, <code>prometheus.yml<\/code>, in order to scrape the <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> engine metrics.<\/p>\n<pre class=\"brush:bash\">scrape_configs:\n  - job_name: 'prometheus'\n    static_configs:\n      - targets: ['localhost:9090']\n  - job_name: 'docker'\n    static_configs:\n      - targets: ['localhost:9323']\n<\/pre>\n<p>With this minimal configuration in hand we could start the <a href=\"https:\/\/prometheus.io\/\">Prometheus<\/a> server (which has reached version <code>2.0<\/code> as of moment of this writing) as <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> container:<\/p>\n<pre class=\"brush:bash\">docker run -p 9090:9090 \\\n    -v prometheus.yml:\/etc\/prometheus\/prometheus.yml \\\n    prom\/Prometheus\n<\/pre>\n<p>Once the container is started, the <a href=\"https:\/\/prometheus.io\/\">Prometheus<\/a> web UI should be available at <a href=\"http:\/\/localhost:9090\">http:\/\/localhost:9090<\/a>. Let us navigate to this URL and check that all targets we have configured are accessible.<\/p>\n<p><figure id=\"attachment_71200\" aria-describedby=\"caption-attachment-71200\" style=\"width: 620px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/prometheus-jcg.png\"><img decoding=\"async\" class=\"wp-image-71200 size-large\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/prometheus-jcg-1024x367.png\" alt=\"Prometheus Targets\" width=\"620\" height=\"222\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/prometheus-jcg-1024x367.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/prometheus-jcg-300x107.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/prometheus-jcg-768x275.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/prometheus-jcg.png 1545w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/a><figcaption id=\"caption-attachment-71200\" class=\"wp-caption-text\">Prometheus Targets<\/figcaption><\/figure><\/p>\n<p>Fairly speaking, the <a href=\"https:\/\/prometheus.io\/\">Prometheus<\/a> web UI is quite capable to graph different metrics but <a href=\"https:\/\/grafana.com\/\">Grafana<\/a>, another open-source project, is the state of the art platform to query, visualize, alert on and understand the metrics.<\/p>\n<pre class=\"brush:bash\">docker run -d -p 3000:3000 \\\n    -e \"GF_SECURITY_ADMIN_PASSWORD=pa$$w0rd\" \\\n    grafana\/grafana\n<\/pre>\n<p><a href=\"https:\/\/grafana.com\/\">Grafana<\/a>\u00a0has a huge list of prebuilt dashboards and one of them, the <a href=\"https:\/\/grafana.com\/dashboards\/1229\">Docker Engine Metrics<\/a> dashboard, is exactly what we are looking for. Here is the sneak peek on how it shows up (beautiful, indeed).<\/p>\n<p><figure id=\"attachment_71201\" aria-describedby=\"caption-attachment-71201\" style=\"width: 620px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/grafana-jcg.png\"><img decoding=\"async\" class=\"wp-image-71201 size-large\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/grafana-jcg-1024x752.png\" alt=\"Grafana Docker Engine Dashboard\" width=\"620\" height=\"455\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/grafana-jcg-1024x752.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/grafana-jcg-300x220.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/grafana-jcg-768x564.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/12\/grafana-jcg.png 1319w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/a><figcaption id=\"caption-attachment-71201\" class=\"wp-caption-text\">Grafana Docker Engine Dashboard<\/figcaption><\/figure><\/p>\n<p>It may not look very meaningful at first glance but you are free to modify it or even build your own, choosing just the <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> engine metrics you are interested in.<\/p>\n<h2><a name=\"conclusions\"><\/a>7. Conclusions<\/h2>\n<p>In this section of the tutorial we have talked about how developer\u2019s best friends, the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Integrated_development_environment\">IDE<\/a>s, keep abreast of the times by providing extensive <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> tooling and support. Beyond just that, we have also mentioned a couple of very useful tools for managing and monitoring your containers and <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> engine itself.<\/p>\n<h2><a name=\"next\"><\/a>8. What\u2019s next<\/h2>\n<p>In the next section of the tutorial we are going to talk about using <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> for testing, particularly in context of doing integration and end-to-end tests of our Java applications.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article is part of our Academy Course titled Docker Tutorial for Java Developers. In this course, we provide a series of tutorials so that you can develop your own Docker based applications. We cover a wide range of topics, from Docker over command line, to development, testing, deployment and continuous integration. With our straightforward &hellip;<\/p>\n","protected":false},"author":141,"featured_media":24013,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[936],"class_list":["post-71137","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","tag-docker"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Docker for Java Developers: Develop on Docker - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"This article is part of our Academy Course titled Docker Tutorial for Java Developers. In this course, we provide a series of tutorials so that you can\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2017\/12\/docker-java-developers-develop-docker.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Docker for Java Developers: Develop on Docker - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"This article is part of our Academy Course titled Docker Tutorial for Java Developers. In this course, we provide a series of tutorials so that you can\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2017\/12\/docker-java-developers-develop-docker.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2017-12-11T17:00:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-11T08:30:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/04\/docker-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Andrey Redko\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andrey Redko\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/docker-java-developers-develop-docker.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/docker-java-developers-develop-docker.html\"},\"author\":{\"name\":\"Andrey Redko\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/771a6504862edc45322776832cbce413\"},\"headline\":\"Docker for Java Developers: Develop on Docker\",\"datePublished\":\"2017-12-11T17:00:45+00:00\",\"dateModified\":\"2023-12-11T08:30:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/docker-java-developers-develop-docker.html\"},\"wordCount\":2115,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/docker-java-developers-develop-docker.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/docker-logo.jpg\",\"keywords\":[\"Docker\"],\"articleSection\":[\"DevOps\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/docker-java-developers-develop-docker.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/docker-java-developers-develop-docker.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/docker-java-developers-develop-docker.html\",\"name\":\"Docker for Java Developers: Develop on Docker - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/docker-java-developers-develop-docker.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/docker-java-developers-develop-docker.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/docker-logo.jpg\",\"datePublished\":\"2017-12-11T17:00:45+00:00\",\"dateModified\":\"2023-12-11T08:30:18+00:00\",\"description\":\"This article is part of our Academy Course titled Docker Tutorial for Java Developers. In this course, we provide a series of tutorials so that you can\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/docker-java-developers-develop-docker.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/docker-java-developers-develop-docker.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/docker-java-developers-develop-docker.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/docker-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/docker-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/docker-java-developers-develop-docker.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DevOps\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/devops\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Docker for Java Developers: Develop on Docker\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/771a6504862edc45322776832cbce413\",\"name\":\"Andrey Redko\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/16419ce8394173028eddaeb992859862bab50cfcf74589fa9bb9a3dd8bb27518?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/16419ce8394173028eddaeb992859862bab50cfcf74589fa9bb9a3dd8bb27518?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/16419ce8394173028eddaeb992859862bab50cfcf74589fa9bb9a3dd8bb27518?s=96&d=mm&r=g\",\"caption\":\"Andrey Redko\"},\"description\":\"Andriy is a well-grounded software developer with more then 12 years of practical experience using Java\\\/EE, C#\\\/.NET, C++, Groovy, Ruby, functional programming (Scala), databases (MySQL, PostgreSQL, Oracle) and NoSQL solutions (MongoDB, Redis).\",\"sameAs\":[\"http:\\\/\\\/aredko.blogspot.com\\\/\",\"http:\\\/\\\/ca.linkedin.com\\\/in\\\/aredko\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/andrey-redko\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Docker for Java Developers: Develop on Docker - Java Code Geeks","description":"This article is part of our Academy Course titled Docker Tutorial for Java Developers. In this course, we provide a series of tutorials so that you can","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2017\/12\/docker-java-developers-develop-docker.html","og_locale":"en_US","og_type":"article","og_title":"Docker for Java Developers: Develop on Docker - Java Code Geeks","og_description":"This article is part of our Academy Course titled Docker Tutorial for Java Developers. In this course, we provide a series of tutorials so that you can","og_url":"https:\/\/www.javacodegeeks.com\/2017\/12\/docker-java-developers-develop-docker.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2017-12-11T17:00:45+00:00","article_modified_time":"2023-12-11T08:30:18+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/04\/docker-logo.jpg","type":"image\/jpeg"}],"author":"Andrey Redko","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Andrey Redko","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2017\/12\/docker-java-developers-develop-docker.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/12\/docker-java-developers-develop-docker.html"},"author":{"name":"Andrey Redko","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/771a6504862edc45322776832cbce413"},"headline":"Docker for Java Developers: Develop on Docker","datePublished":"2017-12-11T17:00:45+00:00","dateModified":"2023-12-11T08:30:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/12\/docker-java-developers-develop-docker.html"},"wordCount":2115,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/12\/docker-java-developers-develop-docker.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/04\/docker-logo.jpg","keywords":["Docker"],"articleSection":["DevOps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2017\/12\/docker-java-developers-develop-docker.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2017\/12\/docker-java-developers-develop-docker.html","url":"https:\/\/www.javacodegeeks.com\/2017\/12\/docker-java-developers-develop-docker.html","name":"Docker for Java Developers: Develop on Docker - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/12\/docker-java-developers-develop-docker.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/12\/docker-java-developers-develop-docker.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/04\/docker-logo.jpg","datePublished":"2017-12-11T17:00:45+00:00","dateModified":"2023-12-11T08:30:18+00:00","description":"This article is part of our Academy Course titled Docker Tutorial for Java Developers. In this course, we provide a series of tutorials so that you can","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/12\/docker-java-developers-develop-docker.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2017\/12\/docker-java-developers-develop-docker.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2017\/12\/docker-java-developers-develop-docker.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/04\/docker-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/04\/docker-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2017\/12\/docker-java-developers-develop-docker.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"DevOps","item":"https:\/\/www.javacodegeeks.com\/category\/devops"},{"@type":"ListItem","position":3,"name":"Docker for Java Developers: Develop on Docker"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/771a6504862edc45322776832cbce413","name":"Andrey Redko","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/16419ce8394173028eddaeb992859862bab50cfcf74589fa9bb9a3dd8bb27518?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/16419ce8394173028eddaeb992859862bab50cfcf74589fa9bb9a3dd8bb27518?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/16419ce8394173028eddaeb992859862bab50cfcf74589fa9bb9a3dd8bb27518?s=96&d=mm&r=g","caption":"Andrey Redko"},"description":"Andriy is a well-grounded software developer with more then 12 years of practical experience using Java\/EE, C#\/.NET, C++, Groovy, Ruby, functional programming (Scala), databases (MySQL, PostgreSQL, Oracle) and NoSQL solutions (MongoDB, Redis).","sameAs":["http:\/\/aredko.blogspot.com\/","http:\/\/ca.linkedin.com\/in\/aredko"],"url":"https:\/\/www.javacodegeeks.com\/author\/andrey-redko"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/71137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/141"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=71137"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/71137\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/24013"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=71137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=71137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=71137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}