This one handles the messy intersection of Java and Docker containers, which is trickier than it looks. It covers multi-stage builds with proper layer caching, JVM container flags like MaxRAMPercentage and UseContainerSupport, and Spring Boot layered JARs. You'll want this when you're tired of bloated images or dealing with OOMKilled containers because the JVM didn't respect memory limits. The base image comparison (temurin vs distroless vs alpine) is actually useful, and it includes security hardening with non-root users and read-only filesystems. Bonded to the java-devops agent, so it knows both Maven/Gradle build contexts and container orchestration.

skills.sh installs
265
GitHub stars
42
last updated
Aug 21, 2026

Install

$ npx -y skills add pluginagentmarketplace/custom-plugin-java --skill java-docker --agent claude-code

Installs into .claude/skills of the current project.

Files

Java Docker Skill

Containerize Java applications with optimized Dockerfiles and JVM settings.

Overview

This skill covers Docker best practices for Java including multi-stage builds, JVM container settings, security hardening, and layer optimization.

When to Use This Skill

Use when you need to:

  • Create optimized Java Dockerfiles
  • Configure JVM for containers
  • Implement security best practices
  • Reduce image size
  • Set up health checks

Topics Covered

Dockerfile Optimization

  • Multi-stage builds
  • Layer caching strategy
  • Spring Boot layered JARs
  • Dependency caching

JVM Container Settings

  • UseContainerSupport
  • MaxRAMPercentage
  • GC selection
  • Exit on OOM

Security

  • Non-root users
  • Read-only filesystem
  • Vulnerability scanning
  • Secrets handling

Quick Reference

# Multi-stage optimized Dockerfile
FROM eclipse-temurin:21-jdk-alpine AS builder

WORKDIR /app

# Cache dependencies
COPY pom.xml .
COPY .mvn .mvn
RUN mvn dependency:go-offline -B

# Build and extract layers
COPY src ./src
RUN mvn package -DskipTests && \
    java -Djarmode=layertools -jar target/*.jar extract

# Runtime stage
FROM eclipse-temurin:21-jre-alpine

Sponsors

Details

Repository
github.com/pluginagentmarketplace/custom-plugin-java
Categories
Security, DevOps & CI/CD, Java & JVM
First seen
Jun 3, 2026

More from pluginagentmarketplace/custom-plugin-java

All 12

Recommended

More Security
1martinholovsky avatarfastapimartinholovsky/claude-skills-generatorREST API and WebSocket development with FastAPI emphasizing security, performance, and async patterns264skills.sh installs
2patricio0312rev avatarartifact-sbom-publisherpatricio0312rev/skillsProduces build artifacts with Software Bill of Materials (SBOM) and supply chain metadata for security and compliance. Use for "artifact publishing", "SBOM gene252skills.sh installs
3huggingface avatarhugging-face-clihuggingface/skillsExecute Hugging Face Hub operations using the `hf` CLI. Use when the user needs to download models/datasets/spaces, upload files to Hub repositories, create rep249skills.sh installs
4daffy0208 avatarapi-integration-builderdaffy0208/ai-dev-standardsBuild reliable third-party API integrations including OAuth, webhooks, rate limiting, error handling, and data sync. Use when integrating with external services244skills.sh installs
5ancoleman avataradministering-linuxancoleman/ai-design-componentsManage Linux systems covering systemd services, process management, filesystems, networking, performance tuning, and troubleshooting. Use when deploying applica240skills.sh installs
6martinholovsky avatarllm-integrationmartinholovsky/claude-skills-generatorExpert skill for integrating local Large Language Models using llama.cpp and Ollama. Covers secure model loading, inference optimization, prompt handling, and p237skills.sh installs