I am trying to run my scala application in a docker container with 800MB of RAM, (docker run -m=800m mindlevel) but it gets killed before it is done compiling.
[info] Compiling 10 Scala sources to /root/mindlevel-backend/target/scala-2.12/classes...
[info] 'compiler-interface' not yet compiled for Scala 2.12.1. Compiling...
[info] Compilation completed in 8.631 s
/usr/local/sbt/bin/sbt-launch-lib.bash: line 58: 57 Killed "$@"
I have tried to restrict the SBT heap with:
CMD ["sbt", "-mem", "700", "run"]
But it still gets killed at the same place. Without any restrictions on the docker container it runs fine. When running it in an EC2 micro instance (1GB of RAM) it also crashes, with or without restrictions on SBT and Docker.
Is there some restriction that I am missing?