我有一个多项目SBT构建。其中一个子项目是Play项目。通常,我会运行./activator "project website" run
来运行Play项目。我试图设置一个docker开发环境,但在我的Dockerfile中找不到合适的CMD
。我也尝试使用docker compose。我的Dockerfile看起来像:
FROM java:latest
ADD . /code
WORKDIR /code
CMD ["./activator", "\"project website\"", "run"]
我在"project website"
中删除了引号。当我运行docker-compose up
来启动它时,我的项目依赖项下载,但随后它失败了:
wb1_1 | [warn] there were 1 feature warning(s); re-run with -feature for details
wb1_1 | [warn] two warnings found
wb1_1 | release stage is set to: stage
wb1_1 | [info] Set current project to root (in build file:/code/)
wb1_1 | [error] Expected letter
wb1_1 | [error] Expected symbol
wb1_1 | [error] Expected '!'
wb1_1 | [error] Expected '+'
wb1_1 | [error] Expected '++'
wb1_1 | [error] Expected 'debug'
wb1_1 | [error] Expected 'info'
wb1_1 | [error] Expected 'warn'
wb1_1 | [error] Expected 'error'
wb1_1 | [error] Expected ';'
wb1_1 | [error] Expected end of input.
wb1_1 | [error] Expected '--'
wb1_1 | [error] Expected 'show'
wb1_1 | [error] Expected 'all'
wb1_1 | [error] Expected '*'
wb1_1 | [error] Expected '{'
wb1_1 | [error] Expected project ID
wb1_1 | [error] Expected configuration
wb1_1 | [error] Expected key
wb1_1 | [error] Expected '-'
wb1_1 | [error] "project website"
wb1_1 | [error] ^
services_wb1_1 exited with code 1
Gracefully stopping... (press Ctrl+C again to force)
关于如何让我在容器内运行的任何想法?
答案 0 :(得分:1)
根据我们的评论主题,您可以使用CMD ["./activator", "website/run"]