Java EE (and Docker) Quickstart

  1. Create a Thin WAR Java EE project. Name it "micro".
  2. Create a Dockerfile in project folder with the following content:
                FROM airhacks/wildfly
                COPY ./target/micro.war ${DEPLOYMENT_DIR}                

    Also airhacks/payara, airhacks/tomee images are available from The docker files are maintained in

  3. Perform build from project folder: mvn package && docker build -t airhacks/micro .
  4. Run the project: docker run -d -p 8080:8080 --name micro airhacks/micro

See it in action:

Behind the scenes:

  1. CentOS 7, JDK 1.8, the chosen application server (WildFly, Payara, TomEE) is going to be downloaded the first time (~560 MB, see from
  2. All subsequent builds will only rebuild the Thin WAR -- it will take milliseconds. The smaller the WAR, the higher the productivity:
See you at Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home:


How to reach the admin console of wildfly (airhacks/wildfly)? I added also -p 9990:9990 to the run cmd but it doesn't work.

Posted by simon on December 25, 2017 at 10:25 PM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
...the last 150 posts
...the last 10 comments