Я пытаюсь запустить проект с playframework 2.7.2 в докере, но в данный момент, но команда sbt run запускает сервер, а затем останавливается, поэтому я не совсем понимаю, как запустить мой проект через докер?
Dockerfile :
FROM bigtruedata/scala:2.10.6
RUN apt-get update && apt-get install git
RUN wget -O- "https://piccolo.link/sbt-1.2.8.tgz" \
| tar xzf - -C /usr/local --strip-components=1 \
&& sbt exit
WORKDIR /app
EXPOSE 9000 9443
RUN sbt update
COPY app/ .
CMD ["sbt", "run"]
docker-compose.yaml
version: '3.2'
services:
play:
build:
context: .
dockerfile: docker/play/Dockerfile
volumes:
- ./app:/app
ports:
- "9000:9000"
- "9443:9443"
command: "sbt run"
Мой стандартный вывод из докера при запуске:
play_1 | [info] [SUCCESSFUL ] com.typesafe.play#play-docs_2.12;2.7.2!play-docs_2.12.jar (692ms)
play_1 | [info] [SUCCESSFUL ] com.typesafe.play#play-omnidoc_2.12;2.7.2!play-omnidoc_2.12.jar (831ms)
play_1 | [info] Done updating.
play_1 | [warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
play_1 |
play_1 | --- (Running the application, auto-reloading is enabled) ---
play_1 |
play_1 | [info] p.c.s.AkkaHttpServer - Listening for HTTP on /0.0.0.0:9000
play_1 |
play_1 | (Server started, use Enter to stop and go back to the console...)
play_1 |
play_1 | [info] p.c.s.AkkaHttpServer - Stopping server...
play_1 | [info] Compiling 7 Scala sources and 1 Java source to /app/target/scala-2.12/classes ...
play_1 | [info] Non-compiled module 'compiler-bridge_2.12' for Scala 2.12.8. Compiling...
play_1 | [info] Compilation completed in 18.801s.
play_1 | [info] Done compiling.
play_1 | [info] p.a.h.EnabledFilters - Enabled Filters (see <https://www.playframework.com/documentation/latest/Filters>):
play_1 |
play_1 | play.filters.csrf.CSRFFilter
play_1 | play.filters.headers.SecurityHeadersFilter
play_1 | play.filters.hosts.AllowedHostsFilter
play_1 |
play_1 | [info] play.api.Play - Application started (Dev) (no global state)
play_1 |
play_1 | [success] Total time: 53 s, completed May 14, 2019 1:12:39 PM