I need to create an image with tomcat installation details.I tried many dockerfile in net and tried to build but no luck.Can anybody tell me what commands should be their in dockerfile for a successfull tomcat installation?.I dont need any official tomcat image.Thanks in advance.
相关问题
- Docker task in Azure devops won't accept "$(pw
- Unable to run mariadb when mount volume
- Unspecified error (0x80004005) while running a Doc
- What would prevent code running in a Docker contai
- How to reload apache in php-apache docker containe
There are several available options for using Tomcat in Docker. E.g. there are the official versions that you can find on https://registry.hub.docker.com/_/tomcat/
But, If you want to create a file from scratch the following could be of help:
To build the image simply use docker build:
To start the container you must mount a volume with your war-file.
Then you should be all set!
This is what i did to solve this:
Dockerfile
I'm copying those two files in order to access the manager app from outside. If you want it too, add the following to your context and tomcat-users files
Context.xml
tomcat-users.xml
Then you can build it and run it:
Deploy your application as follows: