Developer Partner Community

Dockerized Java EE 8 applications with GlassFish 5.0 by Sebastian Daschner

Jürgen Kress
PaaS Partner Adoption


GlassFish 5.0 represents the reference implementation of Java EE 8. We can dockerize Java EE 8 applications by using a GlassFish base image, such as the official oracle/glassfish.

The Dockerfile of a zero-dependency Java EE 8 application looks like follows:

FROM oracle/glassfish:5.0

COPY target/application.war $GLASSFISH_HOME/glassfish/domains/domain1/autodeploy/

A Docker container of that image starts the application server and auto-deploys our application.

application.war is packaged a thin WAR deployment artifact, what speeds up build, publishing and deployment times. The WAR file comprises only application-specific classes, no implementation-specific JAR files. If needed, any dependencies are added on top of the base image — before the actual application.

Imagine, we want to add the Prometheus Java API: Read the complete article here.

Developer Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Technorati Tags: PaaS,Cloud,Middleware Update,WebLogic, WebLogic Community,Oracle,OPN,Jürgen Kress

Join the discussion

Comments ( 2 )
  • Carles Thursday, August 9, 2018
    $ docker pull oracle/glassfish:5.0
    Error response from daemon: pull access denied for oracle/glassfish, repository does not exist or may require 'docker login'
  • Juergen Kress Wednesday, September 26, 2018
    Please create a support request at https://support.oracle.com/
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.