Difficulty: beginner
Estimated Time: 5 minutes

In this tutorial we are going to compile, build and run a small Java EE 8 microservice using Docker.

By then end of this tutorial you now have the essential know-how to compile, build and run your own Java EE 8 microservice with Docker.

Building Java EE 8 microservices with Docker

Step 1 of 2

Build microservice with Docker

First, we need to build the microservice and the image using Docker. We are going to use a multi-stage build for this.


Have a look the Builderfile to get an impression of the simplicity of doing containerized builds (press Q to exit). less Builderfile

Build the Docker image by running the following command: docker build -t javaee8-service:1.0.1 -f Builderfile .