如何在docker上部署spring cloud数据流

时间:2016-03-13 13:29:11

标签: docker spring-cloud spring-cloud-dataflow

我使用https://github.com/spring-cloud/spring-cloud-dataflow/tree/master/spring-cloud-dataflow-app-launcher

操作系统:ubuntu 15.10

然后

$ mvn package docker:build
$ docker-compose up

但遇到错误:

    timesource_1 | java.lang.IllegalStateException: No 'Start-Class' manifest entry specified in jar:file:/root/.m2/repository/org/springframework/cloud/stream/module/time-source/1.0.0.BUILD-SNAPSHOT/time-source-1.0.0.BUILD-SNAPSHOT.jar!/
timesource_1 |  at org.springframework.boot.loader.archive.Archive.getMainClass(Archive.java:57)
timesource_1 |  at org.springframework.boot.loader.ExecutableArchiveLauncher.getMainClass(ExecutableArchiveLauncher.java:69)
timesource_1 |  at org.springframework.boot.loader.Launcher.launch(Launcher.java:61)
timesource_1 |  at org.springframework.cloud.dataflow.app.launcher.ModuleJarLauncher.launch(ModuleJarLauncher.java:47)
timesource_1 |  at org.springframework.cloud.dataflow.app.launcher.ModuleLauncher.launchModule(ModuleLauncher.java:238)
timesource_1 |  at org.springframework.cloud.dataflow.app.launcher.ModuleLauncher.launchIndividualModules(ModuleLauncher.java:228)
timesource_1 |  at org.springframework.cloud.dataflow.app.launcher.ModuleLauncher.launch(ModuleLauncher.java:100)
timesource_1 |  at org.springframework.cloud.dataflow.app.launcher.ModuleLauncherRunner.run(ModuleLauncherRunner.java:67)
timesource_1 |  at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:806)
timesource_1 |  at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:790)
timesource_1 |  at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:777)
timesource_1 |  at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
timesource_1 |  at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191)
timesource_1 |  at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180)
timesource_1 |  at org.springframework.cloud.dataflow.app.launcher.ModuleLauncherApplication.main(ModuleLauncherApplication.java:45)
timesource_1 |  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
timesource_1 |  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
timesource_1 |  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
timesource_1 |  at java.lang.reflect.Method.invoke(Method.java:498)
timesource_1 |  at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54)
timesource_1 |  at java.lang.Thread.run(Thread.java:745)

我的方法错误了吗?或者如何在docker上部署?

1 个答案:

答案 0 :(得分:0)

嗨,我尝试了一种方法,它对我有用。
也许它会对你有所帮助:

  • 下载docker toolbox for windows
  • 下载 docker-credential-wincred archive
  • 解压缩存档并将可执行文件放入docker文件中
  • 下载最新版本的Spring Cloud Data Flow本地服务器的Docker Compose工件(home page中的链接)
  • 启动Docker终端并使用它,转到包含docker-compose.yml文件的目录
  • 类型:docker-compose up
  • 在浏览器中转到页面:MachineDockerIPAdress:9393 / dashboard
    (要查找机器的docker ip地址,你应该输入docher的终端:docker-machine ip)