创建包含本地 jar 的 Spring Dataflow 服务器容器
我想将 Spring Dataflow 服务器打包到一个容器中,该容器将包含一个本地 jar 应用程序。将其发布到本地存储库,期望最终结果与普通数据流服务器相同: https://hub.docker.com/r/springcloud/spring-云数据流服务器 只是添加了本地罐子。
创建 Dockerfile 以包含该 jar 很简单,但我在如何将 jar 注册到数据流服务器中有点困难。
我知道一种选择是使用 RESTapi,但在 docker 创建过程中启动数据流服务器感觉相当复杂。我发现文档 application.yml 也可能是执行此操作的一种方法,但无法弄清楚具体如何操作。
那么有没有一种简单的方法将jar打包到数据流服务器docker容器中?
I'd like to package spring dataflow server into a container which will contain one local jar application. Publish this into local repo, expectation is that end result is same as the normal dataflow server:
https://hub.docker.com/r/springcloud/spring-cloud-dataflow-server
just with the local jar added.
Creating the Dockerfile to include the jar is straightforward, but I'm strugling a bit with how to register the jar into dataflow server.
I know one option is to use the RESTapi, but it feels quite complicated to start the dataflow server during the docker creation. I found documentation that application.yml might be a way to do this as well, but couldn't figure out how exactly.
So is there a straightforward way to package a jar into dataflow server docker container?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
API 是唯一实用的方法。看看我们如何通过 docker-compose 安装注册应用程序。
从技术上讲,您还可以预先填充关联的数据库表,但我不建议这样做。
The API is the only practical way to do it. Take a look at how we register apps with the docker-compose installation.
Technically, you could also pre-populate the associated DB table(s), but I don’t recommend this.