【发布时间】:2018-04-04 12:32:39
【问题描述】:
阅读documentation,它说:
根据运行时的不同,可以通过两种方式打包应用程序:
Spring Boot uber-jar that is hosted in a maven repository, file, or HTTP(S). Docker image.
所以我制作了一个运行 hello-world python 程序的 docker 映像,并将其注册到本地 SCDF 服务器上。
app register --name hello-world --type task --uri docker:hello-world:latest
但是当我尝试将它作为任务启动时,它失败了
task create --name helloTask --definition "hello-world"
task launch helloTask
Command failed org.springframework.cloud.dataflow.rest.client.DataFlowClientException: Exception trying to launch....resource = Docker Resource [docker:hello-world:latest]]
我需要另一个服务器环境吗?哪一个?问题是,是否可以使用 SCDF 来运行任何 dockerized 应用程序,或者它只支持 Spring Boot (java)?
PS:我的Dockerfile
FROM python:3.4-alpine
ADD . /code
WORKDIR /code
CMD python app.py
【问题讨论】:
-
我发现如果我想启动 dockers,我应该使用本机服务器(而不是我使用的 docker 镜像)github.com/spring-cloud/spring-cloud-deployer-local/issues/61
-
我现在可以启动任务,但这是生成
docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"--spring.cloud.task.executionid=3\": executable file not found in $PATH": unknown.的stderr.log错误
标签: docker spring-cloud-dataflow spring-cloud-task