java - Docker tomcat edit expanded war files -


i using docker deploy tomcat container running third party war file.

my dockerfile looks this

from tomcat:7-jre8  add my.war ${catalina_home}/webapps/my.war  

when run container tomcat expands war @ runtime , can happily access app @ http://my.ip.addr:8080/mywar/.

however problem want edit couple of config files within war. don't want unpack , repack war file seems messy , hard maintain.

i hoping able tell tomcat expand war part of run steps , use add put in custom files can't seem find way of doing this. war gets expanded when cmd executes , can't edit files after that.

i not sure how achieve docker or else, dont see anyway ask tomcat expand war before starts. per standard practices not idea explode war , tweak contents. kills entire purpose of making war.

rather should make changes app read configuration << tomcat_home >>/conf.

if achieve thing need tell docker add configuration file containers tomcat conf folder.

or if must tamper war file can do: explode war manually (or script) on build machine , instead of adding war directly docker image, map folder. this

add ./target/app-0.1.0.build-snapshot /var/lib/jetty/webapps/root.

and manually add files desired destinations.

add login.jsp /var/lib/jetty/webapps/root/webapps, on , forth.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -