Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

comand and tomcat war support #646

Closed
SnowerWkh opened this issue Jul 18, 2018 · 8 comments
Closed

comand and tomcat war support #646

SnowerWkh opened this issue Jul 18, 2018 · 8 comments

Comments

@SnowerWkh
Copy link

Description of the issue:

  • I want to deploy an tomcat app with a base image, but not have relative parameters can config comand to start container in labels "configuration", "mainClass" is not satisfy
  • I can't put my application war into the specified location of the base image.

Expected behavior:

  • put my application war into the specified location of the base image;
  • can config comand to start container in labels "configuration"

Thanks for contributing!

@coollog
Copy link
Contributor

coollog commented Jul 18, 2018

Hi @SnowerWkh , thanks for filing this issue! We are actively working on support for WARs in #431 .

@YJFinBJ
Copy link

YJFinBJ commented Jul 19, 2018

  • I would like to deploy java war on a tomcat ,so I use a tomcat base image, and I also have not just like "mainClass", I use entrypoint ["catalina.sh",run] in my dockerfile
  • There is some JVM profiles args

@YJFinBJ YJFinBJ mentioned this issue Jul 19, 2018
@coollog
Copy link
Contributor

coollog commented Jul 19, 2018

Hi @YJFinBJ , what sorts of instructions are you performing in your entrypoint script (catalina.sh)? The default base image gcr.io/distroless/java does not include a shell by design. If you'd like to use an entrypoint script, you can use the gcr.io/distroless/java:debug image or another base image that includes a shell.

Are you calculating JVM args in your entrypoint script? If not, I would recommend either setting them using the jvmFlags parameter or adding them via the JAVA_TOOL_OPTIONS environment variable at run time.

@chanseokoh
Copy link
Member

catalina.sh is the script to launch Tomcat that comes with a Tomcat installation.

@chanseokoh
Copy link
Member

@YJFinBJ we are currently gearing toward using Jetty instead of Tomcat, at least for now, for WAR support: #431. If people find Jetty lacking some functionalities and need Tomcat, we can think about the feature to switch the servlet engine.

@YJFinBJ
Copy link

YJFinBJ commented Jul 20, 2018

Hi @coollog @chanseokoh There is start/stop Bootstrap in catalina.sh,and also some env args like JAVA_OPTS etc. And JVM args can setting them in jvmFlags that's OK
But since you are currently gearing toward using Jetty,do you have any demo with war package deploy on jetty, jetty is similar with tomcat I think

@chanseokoh
Copy link
Member

@YJFinBJ this may be helpful: #431 (comment)

@coollog
Copy link
Contributor

coollog commented Aug 3, 2018

Closing this in favor of #431. For WAR use cases now, we recommend converting to a JAR with embedded Tomcat (via dependencies under org.apache.tomcat.embed).

@coollog coollog closed this as completed Aug 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants