在Docker容器中播放2.5.x不通过共享文件夹更新

我正在Docker容器中运行Play Framework 2.5.x的开发环境。 该应用程序的工作原理,我可以通过共享端口在我的浏览器上查看它。 但是,自动更新function不起作用。

从研究中我了解到,这是因为Play的JNotify不会轮询共享文件夹中的文件更改。 我试过这个问题的解决scheme,这是简单的轮询在一个时间间隔通过添加以下build.sbt

PlayKeys.fileWatchService := play.runsupport.FileWatchService.sbt(pollInterval.value)

做了这个改变(并确保它被推送通过共享文件夹),使用activator run成功编译并运行服务器。

 [info] Done updating. --- (Running the application, auto-reloading is enabled) --- [info] pcsNettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000 (Server started, use Ctrl+D to stop and go back to the console...) 

我可以在我的浏览器中查看它。 但是,在更改文件时,不会发生重新编译,刷新也不会改变任何内容。 停止并启动服务器,但确实显示更改。

我想我可能知道为什么,但我不知道如何解决它。 我读过使用activator ~run应该启动服务器,但使用SBT而不是激活。 当我使用这个命令启动服务器时,它挂在:

[info] Set current project to example-user-app in build file:/home/example-user/example-user-app)