如何在jetty Docker中设置默认webapp

有没有一种方法来在docker的Dockerfile中设置默认的webapp?

该文件说,你可以重命名为webapp.war作为root.war,但如果不想这样做,有没有办法指定的Web应用程序为默认(和唯一)的Web应用程序。 我必须修改Dockerfile,还是可以在webapp(context.xml)中指定

谢谢,Rajesh

我想你可以在项目/ WEB-INF下创build一个dockerconfiguration文件,你也可以看到它http://www.eclipse.org/jetty/documentation/current/configuring-specific-webapp-deployment.html#deployable-descriptor -文件

我猜你想访问webapp.war通过使用<hostname:port>与Web应用程序的名称..你可以做redirect通过使用根/ index.htmlredirect到您的Web应用程序.. index.html的内容会是

 <html xmlns="http://www.w3.org/1999/xhtml"> <head> <META HTTP-EQUIV="Refresh" CONTENT="0; URL=/<your Web app name>/"/> </head> <body> </body>