简体   繁体   English

如何在tomcat中使用docker-compose

[英]How to use docker-compose with with tomcat

I am trying to set up a tomcat server. 我正在尝试设置一个tomcat服务器。 I need to edit some of the files within the docker container and want to know is there a way I can save these files so that if we're to do docker-compose up again on another machine it was used the edited files? 我需要编辑docker容器中的某些文件,并且想知道有没有一种方法可以保存这些文件,这样,如果我们要在另一台机器上再次进行docker-compose,就可以使用已编辑的文件? One idea I had was to take the tomcat image to modify it then use the custom image in docker-compose. 我曾经想到的一个方法是先获取tomcat映像进行修改,然后在docker-compose中使用自定义映像。 Or am I just overthinking this and having the edit those files manually is something that I just have to do. 还是我只是想得太多,而手动编辑这些文件是我要做的事情。 Also, I am relatively new to docker so any advice would be helpful. 另外,我对Docker来说还比较陌生,所以任何建议都将对您有所帮助。

Using your own custom version of the tomcat image is the simplest way to configure it to your specifications. 使用您自己的tomcat映像的自定义版本是将其配置为符合规格的最简单方法。

See for instance, as example of configurations: 例如,作为配置示例:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM