Not able to deploy war jboss/wildfly using docker file

1.9k views Asked by At

i am trying to create a image of jboss/wildfly that can be used for war deployment, Below is that docker file i am using for creating image.

But when i run the container with "docker run -p 9990:9990 hello" command jboss server is staring but the war palced in deployment folder is not deploying.

docker file


FROM jboss/wildfly

allow custom external configuration

ADD standalone-full-poc.xml /opt/jboss/wildfly/standalone/configuration/

ADD modules /opt/jboss/wildfly/modules/

Create EAP User

RUN /opt/jboss/wildfly/bin/add-user.sh admin admin@123 --silent

Add eTransfer war to Deployment folder

ADD eTransfer.war /opt/jboss/wildfly/standalone/deployments/

Start Jboss EAP

CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-c", "standalone-full-poc.xml", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]


1

There are 1 answers

0
abin stephen On

Issue resolved: It was happening due to not adding Deployment Scanner in standalone-full-poc.xml:

<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">   <deployment-scanner scan-interval="5000"      relative-to="jboss.server.base.dir" path="deployments" /></subsystem>