Reputation: 712
I have a jboss image hosted in Docker, along with several others. I am able to run the jboss image and use it as container to deploy webapps. Currently using IntelliJ to configure a Docker configuration and deploy war files directly from IntelliJ and pointing to the docker configuration within IntelliJ.
I am looking for ways by which I can deploy this war file directly in my jboss image at Docker. Basically looking at ways to deploy war file without any IntelliJ intervention, with the use of docker-compose to build jboss image along with added war targets successfully deployed. What sort of changes need to be done in jboss.yml file and Dockerfile for jboss image?
Upvotes: 3
Views: 7954
Reputation: 3228
If you want the .war file to be integral part of your image, then you just need to add it as a file resource to your jboss deployment dir during your image assembly via dockerfile. Say your docker file goes like this:
FROM jboss/wildfly
COPY myapp.war /opt/jboss/wildfly/standalone/deployments/
Of course you need to adjust the paths to match your setup and distribution, you can for example use maven docker plugin.
Other option is just to build your server without any deployments and use jboss cli or web admin interface to deploy it. Again you can automate it via maven or RUN command in dockerfile.
Upvotes: 2