0

I am using Tomcat 8 Image in Openshift v3 and have deployed a java app using github repo.

Now I want to edit the catalina.sh file to add additional VM arguments when the server starts.

Can someone please tell me/point me how I can edit the catalina.sh file so that I can add the additional vm args to the JAVA_OPTS variable.

The closest answer which I could get was this but this talks about building your own tomcat image which I do not want as I am using the image from openshift catalog.

Graham Dumpleton
  • 57,726
  • 6
  • 119
  • 134
Deepak Sharma
  • 456
  • 4
  • 15

1 Answers1

1

You can set the JAVA_OPTS or CATALINA_OPTS using oc set env command in the tomcat pod.[0]

FYI [1][2], I also hope to take inspiration for your solutions by referring the usage of jvm parameters in the docker containers.

[0] [ https://docs.openshift.com/container-platform/3.9/dev_guide/environment_variables.html#set-environment-variables ]

[1] [ https://github.com/docker-library/tomcat/issues/8 ]

[2] [ https://github.com/jenkinsci/docker/issues/202 ]

Deepak Sharma
  • 456
  • 4
  • 15
Daein Park
  • 4,393
  • 2
  • 12
  • 21