Problems running scala/play project with Docker

I have a multi project SBT build. One of the sub-projects is a Play project. Normally, I’d run ./activator "project website" run to run the Play project. I’m trying to setup a docker development environment, but having trouble getting a proper CMD in my Dockerfile. I’m trying to use docker compose as well. My Dockerfile looks like:

FROM java:latest
ADD . /code
WORKDIR /code
CMD ["./activator", "\"project website\"", "run"]

I escaped the quotes in "project website". When I run docker-compose up to start this up, my project dependencies download, but then it fails with:

  • Cannot ping server after docker run
  • How do I load a csv from my local machine (mac) to Spark-Neo4j docker?
  • Docker dynamic load balancing with Nginx
  • Docker stopping after first line
  • filesystem layer verification failed for digest
  • Can't join Kubernetes master from nodes hosts by Vagrant
  • 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)
    

    Any ideas on how I can get this to run inside my container?

  • Docker: listening in container, not answering outside
  • How do I create a Named Docker Data Volumes with data shared with host
  • Why Can I not resolve docker.io and other hosts behind proxy from within Vagrant VM
  • Configuration issue in nginx of docker - Troubleshooting docker with no instaces
  • How to run Python Scripts on Mac Terminal using Docker with Tensorflow?
  • “debconf: delaying package configuration, since apt-utils is not installed” :> google notebooks bash error
  • One Solution collect form web for “Problems running scala/play project with Docker”

    As per our comment thread, you can use CMD ["./activator", "website/run"]

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.