Skip to content

pgpbpadilla/maven-multi-module-docker-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker cache for multi-module Maven project

This project demonstrates how to write a multi-stage Dockerfile for a multi-module Maven project, so that Maven dependencies are cached in the early Docker layers of a builder stage and also how to use a layered JAR to create cache layers in the final Docker image.

In this project the user-app module depends on a common module.

Using BuildKit

DOCKER_BUILDKIT='1' docker build \
    -t pgpb/user-app:local \
    -f docker/user-app.dockerfile . \
    && docker run -it pgpb/user-app:local

Without BuildKit

docker build \
    -t pgpb/user-app:local \
    -f docker/user-app.dockerfile . \
    && docker run -it pgpb/user-app:local

References

About

Demo app: Docker cache for multi-module Maven project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published