创建包含本地 jar 的 Spring Dataflow 服务器容器

发布于 2025-01-15 17:08:18 字数 986 浏览 3 评论 0原文

我想将 Spring Dataflow 服务器打包到一个容器中,该容器将包含一个本地 jar 应用程序。将其发布到本地存储库,期望最终结果与普通数据流服务器相同: https://hub.docker.com/r/springcloud/spring-云数据流服务器 只是添加了本地罐子。

创建 Dockerfile 以包含该 jar 很简单,但我在如何将 jar 注册到数据流服务器中有点困难。

我知道一种选择是使用 RESTapi,但在 docker 创建过程中启动数据流服务器感觉相当复杂。我发现文档 application.yml 也可能是执行此操作的一种方法,但无法弄清楚具体如何操作。

https:// github.com/spring-cloud/spring-cloud-dataflow/blob/main/spring-cloud-dataflow-server/README.adoc

https:// docs.spring.io/spring-boot/docs/1.5.13.RELEASE/reference/html/boot-features-external-config.html

那么有没有一种简单的方法将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.

https://github.com/spring-cloud/spring-cloud-dataflow/blob/main/spring-cloud-dataflow-server/README.adoc

https://docs.spring.io/spring-boot/docs/1.5.13.RELEASE/reference/html/boot-features-external-config.html

So is there a straightforward way to package a jar into dataflow server docker container?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧情勿念 2025-01-22 17:08:18

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文