<script type="IN/MemberProfile" data-id="https://www.linkedin.com/in/pojos" data-format="inline"  data-related="false"></script><script type="IN/MemberProfile" data-id="https://www.linkedin.com/in/pojos" data-format="inline"  data-related="false"></script><script type="IN/MemberProfile" data-id="https://www.linkedin.com/in/pojos" data-format="inline"  data-related="false"></script>{"id":6577,"date":"2015-06-15T20:00:19","date_gmt":"2015-06-15T17:00:19","guid":{"rendered":"http:\/\/www.altoros.com\/blog\/?p=6577"},"modified":"2018-08-01T17:23:17","modified_gmt":"2018-08-01T14:23:17","slug":"how-to-deploy-spring-boot-applications-in-docker-containers","status":"publish","type":"post","link":"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/","title":{"rendered":"How to Deploy Spring Boot Applications in Docker Containers"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_79_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/#Deploying_microservices_is_still_challenging\" >Deploying microservices is still challenging<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/#Packaging_a_Spring_Boot_app_as_a_Docker_image\" >Packaging a Spring Boot app as a Docker image<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/#Testing_and_pushing_Docker_images_to_production\" >Testing and pushing Docker images to production<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/#CI_and_production_environments\" >CI and production environments<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/#Easier_with_a_PaaS\" >Easier with a PaaS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/#Want_details_Watch_the_video\" >Want details? Watch the video!<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/#Further_reading\" >Further reading<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/#Relevant_slides\" >Relevant slides<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/#About_the_speaker\" >About the speaker<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Deploying_microservices_is_still_challenging\"><\/span>Deploying microservices is still challenging<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>According to <a href=\"https:\/\/www.linkedin.com\/pub\/chris-richardson\/0\/82\/43b?trk=cws-ppw-member-0-0\" target=\"_blank\">Chris Richardson<\/a>, while all the previous Spring releases only added minor changes to the framework, Spring Boot has simplified deployment of apps and introduced a lot of useful features, for instance, auto-configuration.<\/p>\n<p>Spring Boot <em>\u201cbasically gives you an opinionated way of building a Spring app and it makes it very easy to create standalone, production-ready apps.\u201d<\/em> It <em>\u201canalyzes the class path that you use to figure out what components are necessary and then finds them for you.\u201d<\/em> That is very convenient if you have to constantly re-define services.<\/p>\n<p>Despite Spring Boot simplifying a lot of things, the reality of deploying a microservices app remains complex. If you package it with RPM, you may still have to deal with dependency version concerns, conflicting ports, etc. That\u2019s where immutable infrastructure comes into play.<\/p>\n<p><center><img decoding=\"async\" class=\"alignnone size-full wp-image-1661\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/03\/Deploying-Spring-Boot-based-Microservices-with-Docker.jpg\" alt=\"Deploying Spring Boot-based Microservices with Docker\" width=\"640\" \/><\/center><\/p>\n<p>There are several ways to implement immutable infrastructure\u2014e.g., package the app as an AMI. Unfortunately, AMIs are generally slow and not really portable. In addition, they can weigh gigabytes and are impractical if you want to run multiple VMs\u2014not so good for a distributed system.<\/p>\n<p><em>\u201cThis is what got me interested in Docker. Docker is an incredibly light-weight OS-level virtualization mechanism\u201d<\/em> that runs on top of Linux. The main advantage of Docker over AMI is speed:<\/p>\n<ul>\n<li>Docker images have a layered structure that facilitates sharing and caching between them.<\/li>\n<li>Although Docker images do contain the entire OS, the only thing that is ever booted is the Java executable, so the start-up is lightning-fast.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Packaging_a_Spring_Boot_app_as_a_Docker_image\"><\/span>Packaging a Spring Boot app as a Docker image<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Chris Richardson continues by describing the mechanics of working with Docker images. The first step is preparing a minimum Dockerfile (the recipe), which can be obtained from <a href=\"https:\/\/www.google.by\/webhp?sourceid=chrome-instant&amp;ion=1&amp;espv=2&amp;ie=UTF-8#q=dockerhub\" target=\"_blank\">Docker Hub<\/a>, a giant community-supported repository of Docker images. Then you need to specify the base image, add the required metadata, indicate what port will be exposed to the outside world, set the commands that will run on start-up, and copy the .jar file into the image that you want to build.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-large wp-image-5950\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/03\/springbootanddockeroakjug2015-150528164439-lva1-app6891-1024x791.jpg\" alt=\"Spring Boot and Docker\" width=\"640\" \/><\/p>\n<p>The build process involves creating a new build directory, copying the .jar file created with Gradle into the build directory, and running the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">-docker build<\/code> command against it. The directory is then sent to the Docker daemon to build the Docker image.<\/p>\n<p>The <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">docker run<\/code> command is used for running apps packaged as Docker images. This is the step where you can specify how the image will be run, its name, port mapping, etc. One of the cool features provided by Spring Boot is that you can set configuration properties through OS environment variables. This means you can define external config properties inside your Docker container (using the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">-e<\/code> argument). For instance, if your app uses MongoDB and RabbitMQ, you will can tell it the coordinates of their servers (see the slide below).<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-large wp-image-5951\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/03\/springbootanddockeroakjug3-1024x791.jpg\" alt=\"Spring Boot and Docker 2\" width=\"640\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Testing_and_pushing_Docker_images_to_production\"><\/span>Testing and pushing Docker images to production<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The second half of the talk provides some details about the microservices app built by Chris Richardson using Spring Boot and Docker. The architecture features services written using Scala and Spring Boot and a Node.js-based API gateway. Each of the services uses a <a href=\"https:\/\/www.altoros.com\/blog\/how-to-install-jenkins-ci-on-cloud-foundry-for-continuous-delivery\/\">Jenkins CI<\/a>-based build pipeline.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-large wp-image-5952\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/03\/springbootanddockeroakjug5-1024x791.jpg\" alt=\"Spring Boot and Docker Jenkins Pipeline\" width=\"640\" \/><\/p>\n<p>Testing Docker images is fairly straightforward. Thanks to the nice the REST API of the Docker daemon, it is possible to use HTTP to create and start containers. During smoke testing, you start a container, ping an URL, shut the container down, and delete it.<\/p>\n<p>The next step is to push the Docker image to a hosted registry (e.g., Docker Hub). To do that, you need to tag the image with the hostname and port of the registry. The process is nicely optimized thanks to layering and only takes 25 seconds. After the image has been published, you can pull and run it in the production environment. Pulling also takes about 25 seconds.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"CI_and_production_environments\"><\/span>CI and production environments<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The last part of the talk was dedicated to the details of the continuous integration and production environments used by the microservices application.<\/p>\n<p>The CI environment consists of Jenkins and Artifactory, which are running as Docker containers on AWS EC2. A separate EBS volume hosts <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">\/jenkins-home<\/code>, <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">\/gradle-home<\/code>, and <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">\/artifactory-home<\/code>, so that the state is not lost every time the container is restarted. Gradle is also externalized to speed up the build process.<\/p>\n<p>The production environment consists of an EC2 instance. Updates are done with a Python script that finds outdated images in production using the Jenkins API and then updates them by SSH-ing and running <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">docker pull<\/code> to download and install a new version of Docker.<\/p>\n<blockquote><p><em>\u201cIt\u2019s like five seconds to build an image, 25 seconds to push it, 25 secs to pull it, and then it takes 10 seconds to start. So, that\u2019s 75 seconds from build completing and it actually running in production.\u201d \u2014Chris Richardson<\/em>\n<\/p><\/blockquote>\n<p>The bottom line is that Docker containers are a lot faster and more convenient for running microservices than AMIs. Therefore, it is not surprising that Docker is so popular and has already been enabled on several clouds, such as AWS and GCE.<\/p>\n<div id=\"\" class=\"clearfix padded-panel\"><div class=\"details-box-wrapper\" style=\"\/* background-image:url(http:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/04\/cf-after-dark-apache-brooklyn.gif); *\/\"><div class=\"details-box-overlay details-box-overlay-a\"><\/div><div class=\"details-box\"><div class=\"section-title\">Altoros Take<\/div><div class=\"details-wrapper\"><div class=\"detail-item\"><div class=\"take\"><span>\n<h3><span class=\"ez-toc-section\" id=\"Easier_with_a_PaaS\"><\/span>Easier with a PaaS<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Microservice architectures enable easy scaling, a possibility to evolve different parts of the system independently, using any languages and frameworks, high availability, and other cool features. What is more important, they enable faster innovation\u2014something that everyone wants. But nothing in this world comes for free. Managing numerous small services and their multiple copies, which you need for failover or to handle large workloads, can be a nightmare.<\/p>\n<p> In addition, this architectural style may lead to increased operational overhead. To address these downsides, you need to provide a high level of automation\u2014e.g., by using a PaaS.<\/p>\n<p>A platform, such as Cloud Foundry, can automate service management, provide containerization, improve server utilization, and take away most of the pain associated with running complex distributed systems.<\/p>\n<p>In a related presentation, <a href='https:\/\/www.altoros.com\/blog\/the-business-benefits-of-microservices-and-cloud-foundry\/\/'>this talk<\/a> by Russ Miles of Simplicity Itself gives a great in-depth overview of how PaaS and microservices fit together. Or, read <a href='https:\/\/www.altoros.com\/research-papers\/microservices-vs-monolithic-architectures-the-pros-cons-and-cloud-foundry-examples\/'>our guide<\/a> on microservices, including Cloud Foundry examples.<\/p>\n<\/span><\/div><\/div><\/div><\/div><\/div><\/div>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Want_details_Watch_the_video\"><\/span>Want details? Watch the video!<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td class=\"video-details-td\">\n<div style=\"float: right; width: 45%; padding-left: 15px; font-size: 14px;\">\n<p><strong>Table of contents<\/strong><\/p>\n<ol>\n<li style=\"margin-bottom: 6px;\">What is Spring Boot? (<a href=\"#wistia_ew04xo6nc6?time=2805\">46&#8217;45&#8221;<\/a>)<\/li>\n<li style=\"margin-bottom: 6px;\">Why immutable infrastructure \/ containerization is so great? (<a href=\"#wistia_ew04xo6nc6?time=3193\">53&#8217;13&#8221;<\/a>)<\/li>\n<li style=\"margin-bottom: 6px;\">How Spring Boot works with Docker (<a href=\"#wistia_ew04xo6nc6?time=3338\">55&#8217;38&#8221;<\/a>)<\/li>\n<li style=\"margin-bottom: 6px;\">What does a Docker- and Jenkins CI-based deployment pipeline look like? (<a href=\"#wistia_ew04xo6nc6?time=4206\">70&#8217;06&#8221;<\/a>)<\/li>\n<li style=\"margin-bottom: 6px;\">How to deploy a Spring Boot-based microservices with Docker? (<a href=\"#wistia_ew04xo6nc6?time=4329\">72&#8217;14&#8221;<\/a>)<\/li>\n<\/ol>\n<\/div>\n<div id=\"wistia_ew04xo6nc6\" class=\"wistia_embed\" style=\"width: 420px; height: 318px;\"><\/div>\n<p><script src=\"\/\/fast.wistia.com\/assets\/external\/E-v1.js\" charset=\"ISO-8859-1\"><\/script><script>\/\/ <![CDATA[\nwistiaEmbed = Wistia.embed(\"ew04xo6nc6\");\n\/\/ ]]><\/script><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Further_reading\"><\/span>Further reading<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/docker-containers-cloud-foundry-and-diego\/\">Docker Containers, Cloud Foundry, and Diego\u2014Why Abstraction Matters<\/a><\/li>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/how-to-install-jenkins-ci-on-cloud-foundry-for-continuous-delivery\/\">How to Install Jenkins CI on Cloud Foundry for Continuous Delivery<\/a>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Relevant_slides\"><\/span>Relevant slides<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><center><iframe loading=\"lazy\" style=\"border: 1px solid #CCC; border-width: 1px; margin-bottom: 5px; max-width: 100%;\" src=\"\/\/www.slideshare.net\/slideshow\/embed_code\/key\/bGsJSfOfwUnjae\" width=\"425\" height=\"355\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" allowfullscreen=\"allowfullscreen\"> <\/iframe><\/center><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"About_the_speaker\"><\/span>About the speaker<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div>\n<div style=\"float: right;\"><!-- Linkedin Profile Badge: http:\/\/3doordigital.com\/wordpress\/plugins\/linkedin-profile-badge\/ -->\r\n<script type=\"IN\/MemberProfile\" data-id=\"https:\/\/www.linkedin.com\/in\/pojos\" data-format=\"inline\"  data-related=\"false\"><\/script><\/div>\n<div style=\"width: 450px;\"><small><a href=\"https:\/\/www.linkedin.com\/pub\/chris-richardson\/0\/82\/43b?trk=cws-ppw-member-0-0\" target=\"_blank\">Chris Richardson<\/a> is the founder of the original Cloud Foundry PaaS, which was written in Java. Now, he runs a consulting company of his own that helps organizations to improve the software development life cycle through cloud computing, microservices, functional programming, and other technologies. Chris Richardson leads the East Bay Java User Group and is the author of &#8220;POJOs in Action,&#8221; a book that describes how to build enterprise Java apps with Spring and Hibernate.<\/small><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Deploying microservices is still challenging<\/p>\n<p>According to Chris Richardson, while all the previous Spring releases only added minor changes to the framework, Spring Boot has simplified deployment of apps and introduced a lot of useful features, for instance, auto-configuration.<\/p>\n<p>Spring Boot \u201cbasically gives you an opinionated way of building a Spring app [&#8230;]<\/p>\n","protected":false},"author":4,"featured_media":6584,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":"","_links_to":"","_links_to_target":""},"categories":[214],"tags":[911,873,146,206],"class_list":["post-6577","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-ci-cd","tag-cloud-native","tag-microservices","tag-oss-cloud-foundry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Deploy Spring Boot Applications in Docker Containers | Altoros<\/title>\n<meta name=\"description\" content=\"In this video, Chris Richardson, the founder of the original Cloud Foundry, describes how to deploy Spring Boot-based microservices using Docker.\" \/>\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.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Deploy Spring Boot Applications in Docker Containers | Altoros\" \/>\n<meta property=\"og:description\" content=\"In this video, Chris Richardson, the founder of the original Cloud Foundry, describes how to deploy Spring Boot-based microservices using Docker containers.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/\" \/>\n<meta property=\"og:site_name\" content=\"Altoros\" \/>\n<meta property=\"article:published_time\" content=\"2015-06-15T17:00:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-08-01T14:23:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/06\/chris-richardson-springboot-docker.gif\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"393\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/gif\" \/>\n<meta name=\"author\" content=\"Volha Kurylionak\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Volha Kurylionak\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/\",\"url\":\"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/\",\"name\":\"How to Deploy Spring Boot Applications in Docker Containers | Altoros\",\"isPartOf\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/06\/chris-richardson-springboot-docker.gif\",\"datePublished\":\"2015-06-15T17:00:19+00:00\",\"dateModified\":\"2018-08-01T14:23:17+00:00\",\"author\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/06996f567847f38d58a226481dac00d8\"},\"description\":\"In this video, Chris Richardson, the founder of the original Cloud Foundry, describes how to deploy Spring Boot-based microservices using Docker containers.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/#primaryimage\",\"url\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/06\/chris-richardson-springboot-docker.gif\",\"contentUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/06\/chris-richardson-springboot-docker.gif\",\"width\":700,\"height\":393,\"caption\":\"chris-richardson-springboot-docker\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.altoros.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Deploy Spring Boot Applications in Docker Containers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#website\",\"url\":\"https:\/\/www.altoros.com\/blog\/\",\"name\":\"Altoros\",\"description\":\"Insight\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.altoros.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/06996f567847f38d58a226481dac00d8\",\"name\":\"Volha Kurylionak\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/12\/olga-kurilyonok-140x140.jpg\",\"contentUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/12\/olga-kurilyonok-140x140.jpg\",\"caption\":\"Volha Kurylionak\"},\"description\":\"Volha Kurylionak is Technical Writer at Altoros, a Cloud Foundry activist, a technical blogger with 4+ years of experience, and a big fan of open source.\",\"url\":\"https:\/\/www.altoros.com\/blog\/author\/volha-kurylionak\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Deploy Spring Boot Applications in Docker Containers | Altoros","description":"In this video, Chris Richardson, the founder of the original Cloud Foundry, describes how to deploy Spring Boot-based microservices using Docker.","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.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/","og_locale":"en_US","og_type":"article","og_title":"How to Deploy Spring Boot Applications in Docker Containers | Altoros","og_description":"In this video, Chris Richardson, the founder of the original Cloud Foundry, describes how to deploy Spring Boot-based microservices using Docker containers.","og_url":"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/","og_site_name":"Altoros","article_published_time":"2015-06-15T17:00:19+00:00","article_modified_time":"2018-08-01T14:23:17+00:00","og_image":[{"width":700,"height":393,"url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/06\/chris-richardson-springboot-docker.gif","type":"image\/gif"}],"author":"Volha Kurylionak","twitter_misc":{"Written by":"Volha Kurylionak","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/","url":"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/","name":"How to Deploy Spring Boot Applications in Docker Containers | Altoros","isPartOf":{"@id":"https:\/\/www.altoros.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/#primaryimage"},"image":{"@id":"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/#primaryimage"},"thumbnailUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/06\/chris-richardson-springboot-docker.gif","datePublished":"2015-06-15T17:00:19+00:00","dateModified":"2018-08-01T14:23:17+00:00","author":{"@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/06996f567847f38d58a226481dac00d8"},"description":"In this video, Chris Richardson, the founder of the original Cloud Foundry, describes how to deploy Spring Boot-based microservices using Docker containers.","breadcrumb":{"@id":"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/#primaryimage","url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/06\/chris-richardson-springboot-docker.gif","contentUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/06\/chris-richardson-springboot-docker.gif","width":700,"height":393,"caption":"chris-richardson-springboot-docker"},{"@type":"BreadcrumbList","@id":"https:\/\/www.altoros.com\/blog\/how-to-deploy-spring-boot-applications-in-docker-containers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.altoros.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Deploy Spring Boot Applications in Docker Containers"}]},{"@type":"WebSite","@id":"https:\/\/www.altoros.com\/blog\/#website","url":"https:\/\/www.altoros.com\/blog\/","name":"Altoros","description":"Insight","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.altoros.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/06996f567847f38d58a226481dac00d8","name":"Volha Kurylionak","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/12\/olga-kurilyonok-140x140.jpg","contentUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/12\/olga-kurilyonok-140x140.jpg","caption":"Volha Kurylionak"},"description":"Volha Kurylionak is Technical Writer at Altoros, a Cloud Foundry activist, a technical blogger with 4+ years of experience, and a big fan of open source.","url":"https:\/\/www.altoros.com\/blog\/author\/volha-kurylionak\/"}]}},"_links":{"self":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/6577","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/comments?post=6577"}],"version-history":[{"count":13,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/6577\/revisions"}],"predecessor-version":[{"id":34307,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/6577\/revisions\/34307"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/media\/6584"}],"wp:attachment":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/media?parent=6577"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/categories?post=6577"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/tags?post=6577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}