Docker Java Multi-stage Builds
Java
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
Dockerfile
Dockerfile.single
LICENSE
pom.xml adding #JavaEE application and updating pom Apr 21, 2017
readme.adoc

readme.adoc

Multi-stage Docker Build for Java Applications

This repository shows how to create a multi-stage Docker build for Java application.

Single-stage

  1. Build: docker image build -f Dockerfile.single -t people:singlestage .

  2. Run: docker container run -it -p 8080:8080 people:singlestage

  3. Access: curl http://localhost:8080/people/resources/persons

Multi-stage

  1. Build: docker image build -f Dockerfile -t people:multistage .

  2. Run: docker container run -it -p 8080:8080 people:multistage

  3. Access: curl http://localhost:8080/people/resources/persons