0

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:

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?

6
  • The quotes are on the command-line used to pass project website as one argument. You don't actually want to pass them to activator. As a side note, you can do activator website/run since Play 2.4
    – dwickern
    Commented Jul 16, 2015 at 2:36
  • @dwickern ugh. I'm stil using 2.3.8
    – LuxuryMode
    Commented Jul 16, 2015 at 2:38
  • @dwickern do you have a recommendation if I'm not using 2.4?
    – LuxuryMode
    Commented Jul 16, 2015 at 2:45
  • Have you tried removing the escaped quotes?
    – dwickern
    Commented Jul 16, 2015 at 2:51
  • @dwickern using website/run worked. Has nothing to do with Play version apparently. Can you post as answer so I can accept it? :)
    – LuxuryMode
    Commented Jul 16, 2015 at 2:56

1 Answer 1

1

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

2
  • Apparently this wasn't so simple. If I run my project that way, none of my Actions work. I get Action not found, no router defined for all routes.
    – LuxuryMode
    Commented Jul 16, 2015 at 3:33
  • You could try my original advice (remove the escaped quotes) or upgrade to Play 2.4
    – dwickern
    Commented Jul 16, 2015 at 4:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.