【问题标题】:play sbt not starting on scala docker image播放 sbt 未在 scala docker 映像上启动
【发布时间】:2018-03-25 03:54:05
【问题描述】:

我正在尝试在 docker image bitbucketpipelines/scala-sbt:scala-2.12 上运行我的 play/scala 应用程序。应用程序启动后立即退出,没有任何错误消息(就像正常终止一样)。

root@db0eca2925cf:~# sbt -v -XX:MaxMetaspaceSize=256m run < /dev/null
[process_args] java_version = '1.8'
# Executing command line:
java
-Xms1024m
-Xmx1024m
-XX:ReservedCodeCacheSize=128m
-XX:MaxMetaspaceSize=256m
-jar
/usr/share/sbt/bin/sbt-launch.jar
-XX:MaxMetaspaceSize=256m
run

[info] Loading project definition from /root/project
[info] Set current project to MyApp (in build file:/root/)
[warn] The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0
[info] Generated messages files
[info] Generated messages files

--- (Running the application, auto-reloading is enabled) ---

[info] p.c.s.NettyServer - Listening for HTTP on /0.0.0.0:9000          

(Server started, use Ctrl+D to stop and go back to the console...)

[info] p.c.s.NettyServer - Stopping server...

[success] Total time: 24 s, completed Oct 13, 2017 4:35:44 AM
root@db0eca2925cf:~# 

我缺少什么吗?以下是我创建容器的方式:

docker run -it \
        --volume=<my project root here>:/root \
        --workdir="/root" \
        --memory=4g --memory-swap=4g --memory-swappiness=0 \
        bitbucketpipelines/scala-sbt:scala-2.12 /bin/bash

【问题讨论】:

    标签: java scala docker playframework sbt


    【解决方案1】:

    尝试添加-a stdin -a stdout -a stderr。请参阅 docker 文档中的 foreground

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-11-20
      • 2023-03-22
      • 2020-05-16
      • 1970-01-01
      • 2016-05-30
      • 2019-04-02
      • 1970-01-01
      • 2020-10-17
      相关资源
      最近更新 更多