0

copy the war file into wildfly images without extract the war file

FROM jboss/wildfly
ADD your-awesome-app.war /opt/jboss/wildfly/standalone/deployments/

when i add my war file into the docker images the war file auto extract. then make the wildfly service fail to start

what i gonna ask is how to add the war file without extract the war file

BIlly Sutomo
  • 407
  • 1
  • 6
  • 20

2 Answers2

4

Try using the COPY command, as opposed to ADD.

COPY your-awesome-app.war /opt/jboss/wildfly/standalone/deployments/

See the Dockerfile documentation and a helpful stackoverflow question that both discuss the subtle, yet important differences between COPY and ADD.

Community
  • 1
  • 1
reedflinch
  • 73
  • 1
  • 10
0

i already found the answer

from this

FROM jboss/wildfly
ADD your-awesome-app.war /opt/jboss/wildfly/standalone/deployments/

change to this

FROM jboss/wildfly
ADD your-awesome-app.war /opt/jboss/wildfly/standalone/deployments/your-awesome-app.war

and it will copy the extract file to the war file same as the file name

BIlly Sutomo
  • 407
  • 1
  • 6
  • 20