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:

  • How can I force ssl connections in Percona server using Docker?
  • Docker user permission while mounting a directory
  • docker and image size limit
  • Connect to SQL Server database from a docker container
  • Running Amazon-Linux Docker Image on MacOS
  • Port forwarding with Elastic docker image
  • 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?

  • Extending Rancher's Auth-service to use other (OAuth) provider
  • Autoscale Docker Swarm Services
  • Docker on mac with VirtualBox VM in Bridged mode
  • How to run Arangodb on Openshift?
  • Dockerfile entrypoint script arguments in docker run
  • NodeMCU build custom firmware by Docker protocol 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.