GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - aboullaite/java-docker

BranchesTags
Open more actions menu

Latest commit

 

History

21 Commits
21 Commits

Folders and files

NameName
Last commit message
Last commit date
src/main/java/me/aboullaite/dockercon
src/main/java/me/aboullaite/dockercon
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
Readme.md
Readme.md
 
 
bench.sh
bench.sh
 
 
dependency-reduced-pom.xml
dependency-reduced-pom.xml
 
 
pom.xml
pom.xml
 
 

Repository files navigation

Docker & Java

This repo contains demo materials for:

  • Tips minimize java containers images
  • Tricks for fast startup java apps running in containers
  • gotchas and issues while running java apps in containers and the improvements that has been made

The repo is split into multiple branches, each contains a specific topic. The Dockerfiles uses the generated jar after running the build (mvn clean package). The build step could be integrated in the provided Dockerfiles, but it would slow the demoing the intention of this repo, so I kept it outside. Below branch details:

  • master: simple netty app, running in a container
  • mod: Using Project Jigsaw’s jlink, that offers the ability to produce a minimal JRE based on the modules our application requires.
  • alpine: based on project Portola: the community effort to port java to musl
  • cdc: This showcase the class data sharing (CDS) feature. CDC offers dynamic sharing of data between multiple Java Virtual Machines (JVM), which helps to reduce the startup time and memory footprint.
  • aot: [Depreicated and removed in Java 17] Using Ahead Of Time compilation. It compiles the bytecode such that it is completely static which should lead to the fastest startup and initial execution speed.
  • graal: This part uses graal VM to create native images for existing JVM-based applications.
  • sb: This branch contains a simple instructions to run the petclinic application and test how it behaves running inside a java 8 docker container, and java 11!

Benchmarking

the bench.sh run each container and print at the end the total size of the image + the time it takes for teh container to run! for me I named the images: plain, cdc,aot,graal, alpine and mod. I prefixed each of them with dj! Executing the scripts shows below results in my machine:

Image   size        Startup
plain    353.836MB   627 ms
mod      59.12MB     649 ms
alpine   47.0079MB   651 ms
aot      392.888MB   537 ms
cds      357.231MB   547 ms
graal    13.3264MB   3 ms

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

45 stars

Watchers

3 watching

Forks

42 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.