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:

NEW online workshop: Web Components training (online)

Airport MUC workshops: Java EE 8, Java 9: Bootstrap, Effective, Architectures, Single Page Apps, Progressive Web Apps, HTML 5, ES 6, CSS 3 and Microservices

Podcast: and newsletter:

A book about rethinking Java EE Patterns


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
Online Workshops
...the last 150 posts
...the last 10 comments