Sign inSign up

kooldev/java

By kooldev

Updated about 5 years ago

Image
0

1.3K

kooldev/java repository overview

CI/CD

Description

Minimal Java Docker image focused on Java applications based on Amazon Corretto. It's use is intended for kool.dev, but can fit in any other Java use-case.

Automatically load classpath in applications using maven or gradle architecture.

Available Tags

The image built is kooldev/java which has a bunch of tags available:

16
15
11
8

Environment Variables

VariableDefault ValueDescription
ASUSER0Changes the user id that executes the commands
UID0Changes the user id that executes the commands (ignored if ASUSER is provided)
VM_OPTIONS_XMS256mSee Java Documentations
VM_OPTIONS_XMX256mSee Java Documentations
VM_OPTIONS_MAX_METASPACE_SIZE256mSee Java Documentations
VM_OPTIONS_PERM_SIZE512mSee Java Documentations
VM_OPTIONS_XMN64mSee Java Documentations
VM_OPTIONS_SURVIVOR_RATIO128See Java Documentations
CMS_TRIGGER_PERCENT70See Java Documentations
JVM_FILE_ENCODINGUTF-8See Java Documentations
JVM_TTL60See Java Documentations
JVM_USER_LANGUAGEenSee Java Documentations
JVM_USER_COUNTRYUSSee Java Documentations
TZSet default Timezone
JAVA_OPTIONSAdditional Java Options
RMI_SERVER_HOSTNAMESee Java Documentations
JVM_JMXREMOTE_PORTSee Java Documentations
JVM_JMXREMOTE_AUTHENTICATESee Java Documentations
JVM_JMXREMOTE_SSLSee Java Documentations
DEBUG_PORT9000Debug port
DEBUG_SUSPENDnSuspend debug to waiting attached
CLASSPATHCustom classpath, bay default defined by maven or gradle architecture
MAIN_CLASSClass main, required by execute
PROD
VariableDefault ValueDescription
ASUSER0Changes the user id that executes the commands
UID0Changes the user id that executes the commands (ignored if ASUSER is provided)
VM_OPTIONS_XMS256mSee Java Documentations
VM_OPTIONS_XMX256mSee Java Documentations
VM_OPTIONS_MAX_METASPACE_SIZE256mSee Java Documentations
VM_OPTIONS_PERM_SIZE512mSee Java Documentations
VM_OPTIONS_XMN64mSee Java Documentations
VM_OPTIONS_SURVIVOR_RATIO128See Java Documentations
CMS_TRIGGER_PERCENT70See Java Documentations
JVM_FILE_ENCODINGUTF-8See Java Documentations
JVM_TTL60See Java Documentations
JVM_USER_LANGUAGEenSee Java Documentations
JVM_USER_COUNTRYUSSee Java Documentations
TZSet default Timezone
JAVA_OPTIONSAdditional Java Options
JAR_FILE/app/application.jarJar file you application

Usage

The developer version, you need mount your volume to maven and gradle.

  • $HOME/.kool/m2:/home/kool/.m2
  • $HOME/.kool/gradle:/home/kool/.gradle
With kool:

In your application directory:

kool docker -e MAIN_CLASS=your.package.MainClass kooldev/java:8

To production version:

kool docker -e JAR_FILE=yout_application.jar kooldev/java:8-prod

Execute Jshell:

kool docker kooldev/java:11 jshell
With docker run:
docker run -it --rm kooldev/java:11 jshell
With docker-compose.yml:
app:
  image: kooldev/java:8
  volumes:
    - ".:/app:cached"
    - "$HOME/.ssh/id_rsa:/home/developer/.ssh/id_rsa:cached"
  environment:
    ASUSER: "${$UID}"

Contributing

Update images with templates

You should change fwd-template.json for configuration and template folder for the actual base templates.

After any changes, we need to run kool run template to parse the templates and generate all versions folder/files.

License

The MIT License (MIT). Please see License File for more information.

Tag summary

Content type

Image

Digest

Size

306.8 MB

Last updated

about 5 years ago

docker pull kooldev/java:8-g5