I have a Dockerfile
similar to this one:
FROM tomcat:7-jre8-alpine
...
ENTRYPOINT ["sh", "docker-entrypoint.sh"]
I would like to be able to use it in production after doing all testing and development. During development I'd like to use JRebel and activate debugging, preferably without making changes to the Dockerfile or needing an additional one. To use JRebel unfortunately the jrebel.jar
needs to be part of the container/image and JAVA_OPTS
need to be enhanced with:
"-javaagent:/jrebel.jar -Drebel.remoting_plugin=true"
Also the tomcat debuggin has to be enabled with:
"-agentlib:jdwp=transport=dt_socket, address=1043, server=y, suspend=n"
Is it possible to have one Dockerfile
and then via run options or something like that enable the development options I need? What would be a feasible option to have a "productive" docker image that can be used to run a container during development?