
Java Docker
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-codeInstalls 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