Here is the image containing ‘activator’ which can be used to reproduce the scenario.
Note that its a humungous image of size ~3G because I copied all the sbt/ivy2 dependencies to reduce the startup time in addition to it having base image of java:8-jdk.
Anyway to reproduce the scenario, first you will have to create a project on local director using the container.
cd into a temp directory somewhere on your machine and execute the following command:
docker run --rm -v $(pwd):/project naumanbadar/activator-runner activator new TestPlay play-scala
This will create a project directory called TestPlay in your
pwd. Next you start the
compile process which will recompile the project on any file change with the following command:
docker run --rm -it -v $(pwd)/TestPlay:/project naumanbadar/activator-runner activator ~compile
After it finishes compiling for the first time, it will wait for source changes to trigger compilation again.
Now if you open any source file e.g.
TestPlay/app/controllers/HomeController.scala in your editor of choice on your machine and edit and save it, the compilation process will kick in.
Now this automatic compilation would not start with docker+vmware but it does start with Docker for Mac apparently due to
Now if you leave the process running without changing any files, in case of
running natively without docker java process goes down to ~4% cpu load
running with docker, cpu load stays around 50% for hyperkit and around 25% for osxfs
Note that previously I said that cpu for hyperkit is around 200% but I noticed that if I leave the process idle meaning without changing any files for around 3 minutes, it goes down to 50% as stated above.