{"id":27675,"date":"2018-12-27T10:04:21","date_gmt":"2018-12-27T17:04:21","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/premier-developer\/?p=27675"},"modified":"2019-02-14T20:17:39","modified_gmt":"2019-02-15T03:17:39","slug":"tutorial-run-spring-boot-web-service-in-windows-docker-container","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/premier-developer\/tutorial-run-spring-boot-web-service-in-windows-docker-container\/","title":{"rendered":"Tutorial: Run Spring Boot web service in Windows Docker container"},"content":{"rendered":"<p>Premier Developer Consultant, <a href=\"https:\/\/www.linkedin.com\/in\/ptian\/\">Pete Tian<\/a> demonstrates how to build a Spring Boot web project to run in Docker.<\/p>\n<hr \/>\n<p>This tutorial walks you through: build a Boot web project, create a <em>Dockerfile<\/em>, build a Docker image, then run it in Docker.<\/p>\n<h4>Create a Spring Boot web service<\/h4>\n<p>First, let&#8217;s generate a Spring Boot web project. Open a browser, go to <a href=\"http:\/\/start.spring.io\/\">http:\/\/start.spring.io<\/a>, in <em>Search for dependencies<\/em> bar type <em>Web<\/em>, then click <em>Generate Project<\/em> button.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/media.licdn.com\/dms\/image\/C4E12AQHFElvhbWYmsw\/article-inline_image-shrink_1500_2232\/0?e=1550707200&amp;v=beta&amp;t=RMOz5OpTJ1EDKtYXEok2-txopB2XjEPZZs_bFyVzRBs\" \/><\/p>\n<p>The generated source code is saved to a download folder as <em>demo.zip<\/em>. Extract it to your IDE&#8217;s workspace. Import the project by using the wizard <em>Existing Maven Projects<\/em>.<\/p>\n<p><a href=\"https:\/\/www.linkedin.com\/pulse\/tutorial-run-spring-boot-web-service-windows-docker-container-tian\/?published=t\">Continue reading Tian\u2019s post via LinkedIn.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Build a Boot web project, create a Dockerfile, build a Docker image, then run it in Docker.<\/p>\n","protected":false},"author":582,"featured_media":37840,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[22,55],"tags":[29,54,3],"class_list":["post-27675","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","category-web","tag-docker","tag-java","tag-team"],"acf":[],"blog_post_summary":"<p>Build a Boot web project, create a Dockerfile, build a Docker image, then run it in Docker.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/27675","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/users\/582"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/comments?post=27675"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/27675\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media\/37840"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media?parent=27675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/categories?post=27675"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/tags?post=27675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}