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:

  • single command to stop and remove docker container
  • Can I start multiple Docker containers based on same image at the same time?
  • How to start 2 (or more) instances of Rocket.Chat using Docker Compose?
  • How to configuring Docker Containers with DHCP addresses local host?
  • How do I mount the data from two different versions of the same docker container/volume?
  • Docker within PCF - unable to connect to rabbitmq via AMQP (spring cloud bus)
  • 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 proper redirect link
  • Node.js tcp sockets + linked Docker containers
  • Can't access Docker images when using user namespace
  • Windows Docker Toolbox won't start
  • Dockerfile build yielding lstat error on ADD
  • Can't access php-fpm container from apache
  • 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.