Hi guys, I have a Dockerfile that has been working for me for couple months. The most important part for my question is the following:
CMD ["bin/${module}"]
This is the last line of my Dockerfile. It will just execute the production script of play. Now I want to add JVM options, so following the documentation the first thought was:
CMD ["bin/${module} $JAVA_OPTS"]
But CMD cannot read environment variables... so I had to change to this:
CMD ["sh", "-c", "bin/${module} $JAVA_OPTS"]
What is happening to me now is that I can send some java options, for example this would work: "-J-server" or "-J-d64". But something like "-J-Xms128M" is not working. Actually any option starting with -X is not working. The error message is:
Unrecognized option: -J-Xms128M
Error: Could not create the Java Virtual Machine.
Any idea about this?