{"id":371,"date":"2016-09-07T21:47:41","date_gmt":"2016-09-07T19:47:41","guid":{"rendered":"http:\/\/www.maxx.net.ua\/?p=371"},"modified":"2016-09-07T21:47:41","modified_gmt":"2016-09-07T19:47:41","slug":"docker-containers-with-vagrant-%d1%87%d0%b0%d1%81%d1%82%d0%b8%d0%bd%d0%b0-%d0%b4%d1%80%d1%83%d0%b3%d0%b0","status":"publish","type":"post","link":"https:\/\/www.maxx.net.ua\/?p=371","title":{"rendered":"Docker containers with Vagrant \u2013 \u0447\u0430\u0441\u0442\u0438\u043d\u0430 \u0434\u0440\u0443\u0433\u0430."},"content":{"rendered":"<p>\u0429\u043e\u0431 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438 \u044f\u043a\u0438\u0441\u044c \u0434\u043e\u0434\u0430\u0442\u043e\u043a \u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0456, \u0446\u0435\u0439 \u0434\u043e\u0434\u0430\u0442\u043e\u043a \u0441\u043f\u043e\u0447\u0430\u0442\u043a\u0443 \u0442\u0440\u0435\u0431\u0430 \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438. \u0421\u0442\u0432\u043e\u0440\u0438\u043c\u043e \u043f\u0440\u043e\u0441\u0442\u0438\u0439 \u0434\u043e\u0434\u0430\u0442\u043e\u043a, \u043a\u043e\u0442\u0440\u0438\u0439 \u0431\u0443\u0434\u0435 \u043c\u0430\u0442\u0438 \u043f\u0456\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044f \u0434\u043e \u0431\u0430\u0437\u0438 \u0434\u0430\u043d\u0438\u0445 MongoDB \u0442\u0430 \u0434\u0430\u0441\u0442\u044c \u0437\u043c\u043e\u0433\u0443 \u0449\u043e\u0441\u044c \u0434\u043e \u043d\u0435\u0457 \u043f\u0438\u0441\u0430\u0442\u0438 \u0442\u0430 \u0447\u0438\u0442\u0430\u0442\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u0435. \u0410 \u0443 \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u043e\u043c\u0443 \u0437\u0430\u043f\u0438\u0441\u0456 \u043c\u0438 \u0441\u0442\u0432\u043e\u0440\u0435\u043c\u043e 2 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438 &#8211; \u043e\u0434\u0438\u043d \u0437 \u0431\u0430\u0437\u043e\u044e \u0434\u0430\u043d\u0438\u0445, \u0456\u043d\u0448\u0438\u0439 \u0437 \u0434\u043e\u0434\u0430\u0442\u043a\u043e\u043c.<\/p>\n<p>\u0421\u0442\u0432\u043e\u0440\u044e\u0454\u043c\u043e \u043f\u0440\u043e\u0441\u0442\u0438\u0439 \u0434\u043e\u0434\u0430\u0442\u043e\u043a \u0437 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f\u043c Spring Boot.<\/p>\n<p>1. \u0421\u0442\u0432\u043e\u0440\u044e\u0454\u043c\u043e \u043e\u0431&#8217;\u0454\u043a\u0442, \u043a\u043e\u0442\u0440\u0438\u0439 \u0431\u0443\u0434\u0435\u043c\u043e \u0437\u0431\u0435\u0440\u0456\u0433\u0430\u0442\u0438 \u0443 \u0431\u0430\u0437\u0456 \u0434\u0430\u043d\u0438\u0445<\/p>\n<div>\n<pre class=\"toolbar:1 lang:java decode:true \">package ua.net.maxx.demo.docker;\n\nimport org.springframework.data.annotation.Id;\n\npublic class Item {\n\n\t@Id\n\tprivate String id;\n\tprivate String value;\n\n\tprivate Item() {\n\n\t}\n\n\tpublic String getValue() {\n\t\treturn value;\n\t}\n\n\tpublic void setValue(String value) {\n\t\tthis.value = value;\n\t}\n\n\tpublic String getId() {\n\t\treturn id;\n\t}\n\n\t@Override\n\tpublic String toString() {\n\t\treturn \"Item [id=\" + id + \", value=\" + value + \"]\";\n\t}\n\n}\n<\/pre>\n<p>2. \u0421\u0442\u0432\u043e\u0440\u044e\u0454\u043c\u043e \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0431\u0430\u0437\u0438 \u0434\u0430\u043d\u0438\u0445<\/p>\n<pre class=\"lang:java decode:true \">package ua.net.maxx.demo.docker;\n\nimport org.springframework.data.mongodb.repository.MongoRepository;\n\npublic interface ItemRepository extends MongoRepository&lt;Item, String&gt; {\n\n\tpublic Item findById(String id);\n\n}\n<\/pre>\n<p>3. \u0421\u0442\u0432\u043e\u0440\u044e\u0454\u043c\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440<\/p>\n<pre class=\"lang:java decode:true \">package ua.net.maxx.demo.docker;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestBody;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\n@Controller\n@RequestMapping(\"\/demo\")\npublic class WebController {\n\n\t@Autowired\n\tprivate ItemRepository repository;\n\n\t@RequestMapping(method = RequestMethod.GET)\n\tpublic @ResponseBody Item getItem(@RequestParam(value = \"id\", required = true) String id) {\n\t\treturn repository.findById(id);\n\t}\n\n\t@RequestMapping(method = RequestMethod.POST)\n\tpublic @ResponseBody Item getUpdateItem(@RequestBody Item item) {\n\t\treturn repository.save(item);\n\t}\n\n}\n<\/pre>\n<p>4. \u0421\u0442\u0432\u043e\u0440\u044e\u0454\u043c\u043e \u043a\u043b\u0430\u0441 \u0449\u043e\u0431 \u0432\u0438\u043a\u043e\u043d\u0430\u0442\u0438 \u0434\u043e\u0434\u0430\u0442\u043e\u043a<\/p>\n<pre class=\"lang:default decode:true \">package ua.net.maxx.demo.docker;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\n\n@SpringBootApplication\npublic class Starter {\n\n\tpublic static void main(String[] args) {\n\t\tSpringApplication.run(Starter.class, args);\n\t}\n}\n<\/pre>\n<p>5. \u0421\u0442\u0432\u043e\u0440\u044e\u0454\u043c\u043e \u0444\u0430\u0439 \u043a\u043e\u043d\u0444\u0456\u0433\u0443\u0440\u0430\u0446\u0456\u0457<\/p>\n<pre title=\"application.yml\" class=\"lang:yaml decode:true\">spring:\n  profiles.active: default\n---\nspring:\n  profiles: default\n  \n  data:\n    mongodb:\n      host: db-host\n      database: demo-database<\/pre>\n<p>6. \u0421\u0442\u0432\u043e\u0440\u044e\u0454\u043c\u043e \u043a\u043e\u043d\u0444\u0456\u0433\u0443\u0440\u0430\u0446\u0456\u044f \u0434\u043b\u044f maven<\/p>\n<pre class=\"lang:default decode:true \">&lt;project xmlns=\"http:\/\/maven.apache.org\/POM\/4.0.0\" xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n\txsi:schemaLocation=\"http:\/\/maven.apache.org\/POM\/4.0.0 http:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\"&gt;\n\t&lt;modelVersion&gt;4.0.0&lt;\/modelVersion&gt;\n\t&lt;groupId&gt;ua.net.maxx.demo.docker&lt;\/groupId&gt;\n\t&lt;artifactId&gt;docker-demo&lt;\/artifactId&gt;\n\t&lt;version&gt;0.0.1-SNAPSHOT&lt;\/version&gt;\n\t&lt;name&gt;Docker demo project&lt;\/name&gt;\n\n\t&lt;properties&gt;\n\t\t&lt;java.version&gt;1.8&lt;\/java.version&gt;\n\t\t&lt;spring.boot.version&gt;1.4.0.RELEASE&lt;\/spring.boot.version&gt;\n\t&lt;\/properties&gt;\n\n\t&lt;dependencyManagement&gt;\n\t\t&lt;dependencies&gt;\n\t\t\t&lt;dependency&gt;\n\t\t\t\t&lt;!-- Import dependency management from Spring Boot --&gt;\n\t\t\t\t&lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n\t\t\t\t&lt;artifactId&gt;spring-boot-dependencies&lt;\/artifactId&gt;\n\t\t\t\t&lt;version&gt;${spring.boot.version}&lt;\/version&gt;\n\t\t\t\t&lt;type&gt;pom&lt;\/type&gt;\n\t\t\t\t&lt;scope&gt;import&lt;\/scope&gt;\n\t\t\t&lt;\/dependency&gt;\n\t\t&lt;\/dependencies&gt;\n\t&lt;\/dependencyManagement&gt;\n\n\t&lt;dependencies&gt;\n\t\t&lt;dependency&gt;\n\t\t\t&lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n\t\t\t&lt;artifactId&gt;spring-boot-starter-web&lt;\/artifactId&gt;\n\t\t&lt;\/dependency&gt;\n\t\t&lt;dependency&gt;\n\t\t\t&lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n\t\t\t&lt;artifactId&gt;spring-boot-starter-actuator&lt;\/artifactId&gt;\n\t\t&lt;\/dependency&gt;\n\t\t&lt;dependency&gt;\n\t\t\t&lt;groupId&gt;org.springframework.data&lt;\/groupId&gt;\n\t\t\t&lt;artifactId&gt;spring-data-mongodb&lt;\/artifactId&gt;\n\t\t&lt;\/dependency&gt;\n\t&lt;\/dependencies&gt;\n\n\t&lt;build&gt;\n\t\t&lt;plugins&gt;\n\t\t\t&lt;plugin&gt;\n\t\t\t\t&lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n\t\t\t\t&lt;artifactId&gt;spring-boot-maven-plugin&lt;\/artifactId&gt;\n\t\t\t&lt;\/plugin&gt;\n\t\t&lt;\/plugins&gt;\n\t&lt;\/build&gt;\n\n&lt;\/project&gt;<\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440 \u0446\u0435 \u043c\u043e\u0436\u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438 \u0434\u043e\u0434\u0430\u0442\u043e\u043a \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0438<\/p>\n<pre class=\"theme:cisco-router toolbar:2 nums:false lang:sh decode:true\">clean package spring-boot:run<\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440 \u043c\u043e\u0436\u043d\u0430 \u0432\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0442\u0430 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0437\u0430 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f\u043c <a href=\"http:\/\/localhost:8080\/demo\/\">http:\/\/localhost:8080\/demo\/<\/a>\u00a0\u0442\u0430 \u043f\u043e\u0431\u0430\u0447\u0438\u0442\u0438 \u0442\u0430\u043a\u0443 \u0432\u0456\u0434\u043f\u043e\u0432\u0456\u0434\u044c:<\/p>\n<p><a href=\"http:\/\/www.maxx.net.ua\/wp-content\/uploads\/2016\/09\/demo-page-1.png\" rel=\"attachment wp-att-373\"><img loading=\"lazy\" class=\"aligncenter wp-image-373 size-full\" src=\"http:\/\/www.maxx.net.ua\/wp-content\/uploads\/2016\/09\/demo-page-1.png\" alt=\"demo-page-1\" width=\"604\" height=\"238\" srcset=\"https:\/\/www.maxx.net.ua\/wp-content\/uploads\/2016\/09\/demo-page-1.png 604w, https:\/\/www.maxx.net.ua\/wp-content\/uploads\/2016\/09\/demo-page-1-300x118.png 300w\" sizes=\"(max-width: 604px) 100vw, 604px\" \/><\/a><\/p>\n<p>\u041d\u0435\u0437\u0432\u0430\u0436\u0430\u044e\u0447\u0438 \u043d\u0430 \u043f\u043e\u043c\u0438\u043b\u043a\u0443, \u0443\u0441\u0435 \u043f\u0440\u0430\u0446\u044e\u0454 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e. \u0423 \u0446\u044c\u043e\u043c\u0443 \u0434\u043e\u0434\u0430\u0442\u043a\u0443 \u043d\u0435\u043c\u0430\u0454 \u0444\u0443\u043d\u043a\u0446\u0456\u0457, \u044f\u043a\u0430 \u043e\u0431\u0440\u043e\u0431\u043b\u044f\u0454 \u0442\u0430\u043a\u0438\u0439 \u0437\u0430\u043f\u0438\u0442.<\/p>\n<p>7. \u041d\u0430\u0441\u0442\u0443\u043f\u043d\u0438\u043c \u043a\u0440\u043e\u043a\u043e\u043c \u0434\u043e\u0434\u0430\u0454\u043c\u043e \u0434\u043e \u0446\u044c\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0456\u044e, \u044f\u043a\u0430 \u0431\u0443\u0434\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u043e\u0432\u0430\u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u0431\u0456\u0431\u043b\u0456\u043e\u0442\u0435\u043a\u0438 Swagger<\/p>\n<p>\u0434\u043e\u0434\u0430\u0454\u043c\u043e \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0456 \u0440\u044f\u0434\u043a\u0438 \u0434\u043e \u0444\u0430\u0439\u043b\u0443 pom.xml<\/p>\n<pre class=\"lang:default decode:true \">\t\t&lt;dependency&gt;\n\t\t\t&lt;groupId&gt;io.springfox&lt;\/groupId&gt;\n\t\t\t&lt;artifactId&gt;springfox-swagger2&lt;\/artifactId&gt;\n\t\t\t&lt;version&gt;${swagger.version}&lt;\/version&gt;\n\t\t&lt;\/dependency&gt;\n\t\t&lt;dependency&gt;\n\t\t\t&lt;groupId&gt;io.springfox&lt;\/groupId&gt;\n\t\t\t&lt;artifactId&gt;springfox-swagger-ui&lt;\/artifactId&gt;\n\t\t\t&lt;version&gt;${swagger.version}&lt;\/version&gt;\n\t\t&lt;\/dependency&gt;<\/pre>\n<p>\u0422\u0430 \u0434\u043e\u0434\u0430\u0454\u043c\u043e \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0456\u0433\u0443\u0440\u0430\u0446\u0456\u0457 Swagger<\/p>\n<pre class=\"lang:java decode:true \">package ua.net.maxx.demo.docker;\n\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.context.annotation.Configuration;\n\nimport springfox.documentation.builders.PathSelectors;\nimport springfox.documentation.builders.RequestHandlerSelectors;\nimport springfox.documentation.service.ApiInfo;\nimport springfox.documentation.spi.DocumentationType;\nimport springfox.documentation.spring.web.plugins.Docket;\nimport springfox.documentation.swagger2.annotations.EnableSwagger2;\n\n@Configuration\n@EnableSwagger2\npublic class SwaggerConfig {\n\t@Bean\n\tpublic Docket api() {\n\t\treturn new Docket(DocumentationType.SWAGGER_2).select()\n\t\t\t\t.apis(RequestHandlerSelectors.basePackage(\"ua.net.maxx.demo.docker\")).paths(PathSelectors.any()).build()\n\t\t\t\t.apiInfo(apiInfo());\n\t}\n\n\tprivate ApiInfo apiInfo() {\n\t\tApiInfo apiInfo = new ApiInfo(\"Demo service REST API\", \"API for demo\", \"1.0\", \"Terms of service\",\n\t\t\t\t\"myeaddress@company.com\", \"License of API\", \"API license URL\");\n\t\treturn apiInfo;\n\t}\n\n}<\/pre>\n<p>8. \u0422\u0435\u043f\u0435\u0440 \u043c\u043e\u0436\u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438\u00a0\u0434\u043e\u0434\u0430\u0442\u043e\u043a \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u0442\u0456\u0454\u0457 \u0441\u0430\u043c\u043e\u0457 \u043a\u043e\u043c\u0430\u043d\u0434\u0438<\/p>\n<pre class=\"toolbar:2 nums:false lang:sh decode:true\">clean package spring-boot:run<\/pre>\n<p>\u0442\u0430 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0437\u0430 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f\u043c <a href=\"http:\/\/localhost:8080\/swagger-ui.html\">http:\/\/localhost:8080\/swagger-ui.html<\/a>\u00a0\u0442\u0430 \u043d\u0430\u0432\u0456\u0442\u044c \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e Swagger \u0441\u043f\u0440\u043e\u0431\u0443\u0432\u0430\u0442\u0438 \u0432\u0456\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u0438 \u0437\u0430\u043f\u0438\u0442 \u0434\u043e \u0434\u043e\u0434\u0430\u0442\u043a\u0430. \u0423 \u0432\u0456\u0434\u043f\u043e\u0432\u0456\u0434\u044c \u0447\u0435\u0440\u0435\u0437 \u0434\u0435\u044f\u043a\u0438\u0439 \u0447\u0430\u0441 \u043c\u0438 \u043e\u0442\u0440\u0438\u043c\u0430\u0454\u043c\u043e \u043f\u043e\u043c\u0438\u043b\u043a\u0443. \u0426\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u0431\u043e \u0431\u0430\u0437\u0438 \u0434\u0430\u043d\u0438\u0445 \u0432 \u043d\u0430\u0441 \u0434\u043e\u0441\u0456 \u043d\u0435\u043c\u0430\u0454.<\/p>\n<p><a href=\"http:\/\/www.maxx.net.ua\/wp-content\/uploads\/2016\/09\/demo-page-2.png\" rel=\"attachment wp-att-374\"><img loading=\"lazy\" class=\"aligncenter wp-image-374 size-large\" src=\"http:\/\/www.maxx.net.ua\/wp-content\/uploads\/2016\/09\/demo-page-2-1024x406.png\" alt=\"demo-page-2\" width=\"640\" height=\"254\" srcset=\"https:\/\/www.maxx.net.ua\/wp-content\/uploads\/2016\/09\/demo-page-2-1024x406.png 1024w, https:\/\/www.maxx.net.ua\/wp-content\/uploads\/2016\/09\/demo-page-2-300x119.png 300w, https:\/\/www.maxx.net.ua\/wp-content\/uploads\/2016\/09\/demo-page-2-768x304.png 768w, https:\/\/www.maxx.net.ua\/wp-content\/uploads\/2016\/09\/demo-page-2.png 1063w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a>9. \u041d\u0430\u0441\u0442\u0443\u043f\u043d\u0438\u043c \u043a\u0440\u043e\u043a\u043e\u043c \u043f\u0456\u0434\u0433\u043e\u0442\u0443\u0454\u043c\u043e \u043d\u0430\u0448 \u0434\u043e\u0434\u0430\u0442\u043e\u043a \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0456.\u00a0\u0414\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0434\u043e\u0434\u0430\u0454\u043c\u043e \u0443 \u043a\u043e\u043d\u0444\u0456\u0433\u0443\u0440\u0430\u0446\u0456\u044e\u00a0pom.xml \u043f\u043b\u0430\u0433\u0456\u043d\u0438, \u043a\u043e\u0442\u0440\u0438 \u0437\u0431\u0435\u0440\u0443\u0442\u044c \u0443\u0441\u0456 \u0431\u0443\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0443 \u0442\u0435\u043a\u0443 \/lib \u0442\u0430 \u0441\u0442\u0432\u043e\u0440\u044f\u0442\u044c jar \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u0440\u0438\u0439 \u043c\u043e\u0436\u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u0438.<\/p>\n<pre class=\"lang:default decode:true\">&lt;plugin&gt;\n\t\t\t\t&lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;\n\t\t\t\t&lt;artifactId&gt;maven-jar-plugin&lt;\/artifactId&gt;\n\t\t\t\t&lt;configuration&gt;\n\t\t\t\t\t&lt;archive&gt;\n\t\t\t\t\t\t&lt;manifest&gt;\n\t\t\t\t\t\t\t&lt;addClasspath&gt;true&lt;\/addClasspath&gt;\n\t\t\t\t\t\t\t&lt;classpathPrefix&gt;lib\/&lt;\/classpathPrefix&gt;\n\t\t\t\t\t\t\t&lt;mainClass&gt;ua.net.maxx.demo.docker.Starter&lt;\/mainClass&gt;\n\t\t\t\t\t\t&lt;\/manifest&gt;\n\t\t\t\t\t&lt;\/archive&gt;\n\t\t\t\t&lt;\/configuration&gt;\n\t\t\t\t&lt;version&gt;3.0.2&lt;\/version&gt;\n\t\t\t&lt;\/plugin&gt;\n\t\t\t&lt;plugin&gt;\n\t\t\t\t&lt;artifactId&gt;maven-dependency-plugin&lt;\/artifactId&gt;\n\t\t\t\t&lt;executions&gt;\n\t\t\t\t\t&lt;execution&gt;\n\t\t\t\t\t\t&lt;phase&gt;install&lt;\/phase&gt;\n\t\t\t\t\t\t&lt;goals&gt;\n\t\t\t\t\t\t\t&lt;goal&gt;copy-dependencies&lt;\/goal&gt;\n\t\t\t\t\t\t&lt;\/goals&gt;\n\t\t\t\t\t\t&lt;configuration&gt;\n\t\t\t\t\t\t\t&lt;outputDirectory&gt;${project.build.directory}\/lib&lt;\/outputDirectory&gt;\n\t\t\t\t\t\t&lt;\/configuration&gt;\n\t\t\t\t\t&lt;\/execution&gt;\n\t\t\t\t&lt;\/executions&gt;\n\t\t\t\t&lt;version&gt;2.10&lt;\/version&gt;\n\t\t\t&lt;\/plugin&gt;<\/pre>\n<p>10. \u0412\u0438\u043a\u043e\u043d\u0443\u0454\u043c\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<pre class=\"show-lang:2 nums:false lang:swift decode:true \">clean package install<\/pre>\n<p>\u043f\u0456\u0441\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0443 \u0442\u0435\u0446\u0456 \/target \u043c\u043e\u0436\u043d\u0430 \u0431\u0443\u0434\u0435 \u043f\u043e\u0431\u0430\u0447\u0438\u0442\u0438 \u0444\u0430\u0439\u043b docker-demo-0.0.1-SNAPSHOT.jar \u0442\u0430 \u0442\u0435\u043a\u0443 \/lib \u0437 \u0443\u0441\u0456\u043c\u0430 \u0431\u0456\u0431\u043b\u0456\u043e\u0442\u0435\u043a\u0430\u043c\u0438, \u044f\u043a\u0456 \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u0456 \u0446\u044c\u043e\u043c\u0443 \u0434\u043e\u0434\u0430\u0442\u043a\u0443.<\/p>\n<\/div>\n<p class=\"\">\u00a0\u0423 \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0456\u0439 \u0447\u0430\u0441\u0442\u0438\u043d\u0456 \u043c\u0438\u00a0\u0441\u0442\u0432\u043e\u0440\u0438\u043c\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0434\u043e docker \u0442\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c\u043e \u0434\u043e\u0434\u0430\u0442\u043e\u043a \u0443 \u043e\u0431\u0440\u0430\u0437\u0456, \u043a\u043e\u0442\u0440\u0438\u0439 \u0431\u0443\u043b\u043e \u0437\u0440\u043e\u0431\u043b\u0435\u043d\u043e \u0443 <a href=\"http:\/\/www.maxx.net.ua\/archives\/337\">\u0447\u0430\u0441\u0442\u0438\u043d\u0456 \u043f\u0435\u0440\u0448\u0456\u0439<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0429\u043e\u0431 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438 \u044f\u043a\u0438\u0441\u044c \u0434\u043e\u0434\u0430\u0442\u043e\u043a \u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0456, \u0446\u0435\u0439 \u0434\u043e\u0434\u0430\u0442\u043e\u043a \u0441\u043f\u043e\u0447\u0430\u0442\u043a\u0443 \u0442\u0440\u0435\u0431\u0430 \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438. \u0421\u0442\u0432\u043e\u0440\u0438\u043c\u043e \u043f\u0440\u043e\u0441\u0442\u0438\u0439 \u0434\u043e\u0434\u0430\u0442\u043e\u043a, \u043a\u043e\u0442\u0440\u0438\u0439 \u0431\u0443\u0434\u0435 \u043c\u0430\u0442\u0438 \u043f\u0456\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044f \u0434\u043e \u0431\u0430\u0437\u0438 \u0434\u0430\u043d\u0438\u0445 MongoDB \u0442\u0430 \u0434\u0430\u0441\u0442\u044c \u0437\u043c\u043e\u0433\u0443 \u0449\u043e\u0441\u044c \u0434\u043e \u043d\u0435\u0457 \u043f\u0438\u0441\u0430\u0442\u0438 \u0442\u0430 \u0447\u0438\u0442\u0430\u0442\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u0435. \u0410 \u0443 \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u043e\u043c\u0443 \u0437\u0430\u043f\u0438\u0441\u0456 \u043c\u0438 \u0441\u0442\u0432\u043e\u0440\u0435\u043c\u043e 2 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438 &#8211; \u043e\u0434\u0438\u043d \u0437 \u0431\u0430\u0437\u043e\u044e \u0434\u0430\u043d\u0438\u0445, \u0456\u043d\u0448\u0438\u0439 \u0437 \u0434\u043e\u0434\u0430\u0442\u043a\u043e\u043c. \u0421\u0442\u0432\u043e\u0440\u044e\u0454\u043c\u043e \u043f\u0440\u043e\u0441\u0442\u0438\u0439 \u0434\u043e\u0434\u0430\u0442\u043e\u043a \u0437 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f\u043c Spring Boot. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[],"_links":{"self":[{"href":"https:\/\/www.maxx.net.ua\/index.php?rest_route=\/wp\/v2\/posts\/371"}],"collection":[{"href":"https:\/\/www.maxx.net.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.maxx.net.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.maxx.net.ua\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.maxx.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=371"}],"version-history":[{"count":0,"href":"https:\/\/www.maxx.net.ua\/index.php?rest_route=\/wp\/v2\/posts\/371\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.maxx.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=371"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.maxx.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=371"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.maxx.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=371"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}