spring 引导应用程序需要 dockerization 吗?
Do spring boot apps need dockerization?
关于 spring 引导应用需要 dockerization 的任何建议?
通过 Dockerization 增加部署时间?
a. Spring boot app with docker then has to go with building image -> pushing to docker registry -> then pull from docker registry and at last running it.
b. whole process takes time and Continuos deployment is taking now time.
由于 spring 引导带有嵌入式 tomcat,是否不建议将 运行 可执行 jar 文件作为 java -jar 并且您只需要可部署的 JRE主持人?
让我知道你对此的看法..
您的 post 包含几个问题,我不是很清楚。我基本上是在回答标题问题:
Do spring boot apps need dockerization?
是的,确实有道理。您的 Spring 引导应用程序仍然 运行 在 OS 上,安装了一些补丁,可能带有数据库、JRE、打开的端口和一堆其他需要配置的东西。
然后,由于某些原因,您在 LAB 中的设置可能与 Qualification 或 Production 中的设置不同:不一样 OS,不一样的主目录,环境变量,打开的端口,某些命令在环境 x 中不起作用,其他命令仅在 y 中起作用...
至少,Dockerizing 一个 Spring 引导应用程序允许您 运行 在所有环境中使用 相同的配置 。如果开发人员能够运行使用与错误发生位置完全相同的环境,从技术上讲,重现错误会更容易。
有趣的文章:how-to-deploy-spring-boot-applications-in-docker-containers:
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’s where immutable infrastructure comes
into play.
查看另一篇文章:https://dzone.com/articles/dockerizing-spring-boot-applications。
A few months ago I have started new personal project called JVM
Bloggers with a goal to help Polish programmers with spreading news
about their new blog posts. Initially this Spring Boot application was
hosted on my local machine, then I have migrated it to free account on
Heroku.
And for first weeks I was satisfied: application didn’t have to be
online 24/7 so sleeping for 8 hours per day (limitation of free Heroku
account) was not a big problem, 500 MB memory cap didn’t limit me too.
But as JVM Bloggers grown I started to encounter strange issues with
memory usage: application started to consume 500-550MB and it was very
difficult to find a source of this behaviour. I even left application
running on my local machine with a profiler attached but still didn’t
find anything suspicious.
Memory footprint problems became irritating as I had to monitor
application and restart it every 1-2 days and due to Heroku nature I
could not simply ssh to the server and debug or attach profiler to
running process. It became clear that if I am going to add more
features to JVM Bloggers I have to migrate it to something more
flexible – a Linux machine with Docker.
关于 spring 引导应用需要 dockerization 的任何建议?
通过 Dockerization 增加部署时间?
a. Spring boot app with docker then has to go with building image -> pushing to docker registry -> then pull from docker registry and at last running it.
b. whole process takes time and Continuos deployment is taking now time.
由于 spring 引导带有嵌入式 tomcat,是否不建议将 运行 可执行 jar 文件作为 java -jar 并且您只需要可部署的 JRE主持人?
让我知道你对此的看法..
您的 post 包含几个问题,我不是很清楚。我基本上是在回答标题问题:
Do spring boot apps need dockerization?
是的,确实有道理。您的 Spring 引导应用程序仍然 运行 在 OS 上,安装了一些补丁,可能带有数据库、JRE、打开的端口和一堆其他需要配置的东西。
然后,由于某些原因,您在 LAB 中的设置可能与 Qualification 或 Production 中的设置不同:不一样 OS,不一样的主目录,环境变量,打开的端口,某些命令在环境 x 中不起作用,其他命令仅在 y 中起作用...
至少,Dockerizing 一个 Spring 引导应用程序允许您 运行 在所有环境中使用 相同的配置 。如果开发人员能够运行使用与错误发生位置完全相同的环境,从技术上讲,重现错误会更容易。
有趣的文章:how-to-deploy-spring-boot-applications-in-docker-containers:
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’s where immutable infrastructure comes into play.
查看另一篇文章:https://dzone.com/articles/dockerizing-spring-boot-applications。
A few months ago I have started new personal project called JVM Bloggers with a goal to help Polish programmers with spreading news about their new blog posts. Initially this Spring Boot application was hosted on my local machine, then I have migrated it to free account on Heroku.
And for first weeks I was satisfied: application didn’t have to be online 24/7 so sleeping for 8 hours per day (limitation of free Heroku account) was not a big problem, 500 MB memory cap didn’t limit me too. But as JVM Bloggers grown I started to encounter strange issues with memory usage: application started to consume 500-550MB and it was very difficult to find a source of this behaviour. I even left application running on my local machine with a profiler attached but still didn’t find anything suspicious.
Memory footprint problems became irritating as I had to monitor application and restart it every 1-2 days and due to Heroku nature I could not simply ssh to the server and debug or attach profiler to running process. It became clear that if I am going to add more features to JVM Bloggers I have to migrate it to something more flexible – a Linux machine with Docker.