Skip to main content
skill CX Codex

706-technologies-containers-docker — Claude Code skill for Java Docker

706-technologies-containers-docker is a Claude Code skill for reviewing Java Dockerfiles, Maven image builds, jlink runtimes, and container security.

Apache-2.0 225 installs ★ 465 updated 2026-10-21

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add jabrena/plinth --skill 706-technologies-containers-docker -a claude-code
Open on GitHub

What 706-technologies-containers-docker does

This skill reviews Java container work at the Dockerfile, image-build, and runtime layers. It covers multi-stage Maven builds, dependency caching, .dockerignore, and custom Java runtimes built with jlink. Its guidance stays independent of Spring Boot, Quarkus, and Micronaut.

Reviews can account for non-root execution, filesystem permissions, secrets in image layers, JVM settings, and container memory or CPU limits. The skill also addresses image labels, vulnerability scans, SBOM awareness, and reproducible builds. Before proposing Java or Maven changes in the same change set, run ./mvnw compile or mvn compile; before promoting changes, run ./mvnw clean verify or mvn clean verify.

The Java version, build tool, and deployment constraints need to be established when they affect the recommendation. Framework-specific runtime setup and Testcontainers-based tests belong to their corresponding skills, so this one keeps its focus on container artifacts.

What it helps with

  • review a Java project's Dockerfile
  • build a Java image with multiple Maven stages
  • add a jlink runtime to a container
  • switch a container to non-root execution
  • check whether a Docker build is reproducible

Example prompts for the agent

  • Review my Java project's Dockerfile and suggest changes for running the container securely.
  • Add a jlink runtime to this image build and check whether the app's module graph supports it.
  • Assess Docker build reproducibility and account for the container's memory limits.

How to install 706-technologies-containers-docker

1Skills CLI (Vercel)

npx skills add jabrena/plinth --skill 706-technologies-containers-docker -a claude-code

2Manually: put the files in place

~/.claude/skills/706-technologies-containers-docker/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/706-technologies-containers-docker/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about 706-technologies-containers-docker

How do I install 706-technologies-containers-docker in Claude Code?

Run npx skills add jabrena/plinth --skill 706-technologies-containers-docker -a claude-code. The installed skill file is at ~/.claude/skills/706-technologies-containers-docker/SKILL.md.

What does 706-technologies-containers-docker do?

It guides reviews and changes to Java Docker images, covering Dockerfiles, Maven builds, JVM runtime settings, and container security.

Which Maven checks should I run before and after changes?

Before proposing Java or Maven changes in the same change set, run ./mvnw compile or mvn compile. Before promoting the changes, run ./mvnw clean verify or mvn clean verify.

Source text

SKILL.md · Apache-2.0
---
name: 706-technologies-containers-docker
description: Use when you need framework-agnostic Docker and container image guidance for Java projects - Dockerfile design, multi-stage Maven builds, jlink custom runtimes, micro runtime distributions such as Alpaquita, JVM container ergonomics, non-root execution, image metadata, .dockerignore, reproducible builds, vulnerability scanning, SBOM awareness, and production-safe container defaults. This should trigger for requests such as Review Java Dockerfile; Improve Docker image security; Add jlink runtime to a Java container; Add containerization to a Java project; Optimize Java container image size; Review Docker build reproducibility. Part of Plinth Toolkit
license: Apache-2.0
metadata:
  author: Juan Antonio Breña Moral
  version: 0.19.0
---
# Java container image best practices with Docker

Help teams build secure, reproducible, and maintainable **Docker container images** for Java applications without coupling the guidance to Spring Boot, Quarkus, or Micronaut.

**What is covered in this Skill?**

- Dockerfile structure for Java applications: multi-stage builds, Maven dependency caching, deterministic artifact copies, `jlink` custom runtimes, and `.dockerignore`
- Runtime image selection: micro distributions such as Alpaquita, minimal JRE images, pinned versions or digests where appropriate, image labels, and explicit entrypoints
- JVM container ergonomics: memory percentage flags, startup behavior, graceful shutdown signals, time zones, and predictable runtime options
- Security defaults: non-root users, least privilege, no secrets in layers, reduced package managers, vulnerability scanning, SBOM awareness, and avoiding privileged containers
- Operational readiness: health checks when suitable, stdout/stderr logging, port declaration, image size control, build reproducibility, and CI verification

**Scope:** Framework-agnostic Docker and container-image quality for Java projects. For framework runtime wiring, defer to the matching Spring Boot, Quarkus, or Micronaut skill. For Testcontainers-based tests, defer to the relevant testing skill.

## Constraints

Keep recommendations at the Dockerfile, image-build, and runtime-container layer unless the user explicitly asks for framework-specific configuration. After editing this repository's XML sources, regenerate skills and verify the build.

- **MANDATORY**: Run `./mvnw compile` or `mvn compile` before proposing Java or Maven changes in the same change set
- **SECRETS**: Never bake credentials, tokens, private keys, Maven settings with secrets, or environment-specific secrets into image layers, labels, arguments, or logs
- **SECURITY**: Prefer non-root execution, least-privilege filesystem permissions, micro runtime images, and explicit container capabilities over privileged defaults
- **JLINK**: Prefer `jlink` custom runtimes for production images when the module graph is known, validated at runtime, and compatible with the application's dependencies
- **REPRODUCIBILITY**: Pin base image versions intentionally, document digest trade-offs, keep build inputs explicit, and avoid network-dependent runtime startup steps
- **JVM**: Account for container memory and CPU limits with JVM flags, graceful shutdown behavior, and observable startup failures before claiming production readiness
- **BOUNDARIES**: Defer Spring Boot runtime behavior to `@301-frameworks-spring-boot-core`, Quarkus runtime behavior to `@401-frameworks-quarkus-core`, Micronaut runtime behavior to `@501-frameworks-micronaut-core`, and Testcontainers setup to the matching testing skill
- **VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` before promoting changes
- **EDGE CASE**: If the target Java version, build tool, deployment platform, base-image policy, registry policy, or security scanner is missing and affects the recommendation, ask a clarifying question before editing container artifacts
- **EDGE CASE**: If requested changes conflict with security policy, image provenance, air-gapped builds, or runtime platform constraints, explain the trade-off and ask for confirmation

## When to use this skill

- Review Java Dockerfile
- Improve Docker image security
- Add jlink runtime to a Java container
- Add containerization to a Java project
- Optimize Java container image size
- Review Docker build reproducibility

## Workflow

1. **Read reference and assess container context**

Read `references/706-technologies-containers-docker.md` and inspect current Dockerfiles, `.dockerignore`, Maven build inputs, image build scripts, CI jobs, registry policy, and deployment constraints before proposing changes.

2. **Identify runtime and supply-chain constraints**

Confirm Java version, build tool, `jlink` module requirements, micro distro compatibility, target platform, base-image policy, registry requirements, vulnerability scanner, SBOM expectations, memory limits, exposed ports, and operational readiness needs.

3. **Apply container-aligned changes**

Implement or refactor Docker and container build artifacts following the reference patterns and project conventions, keeping framework-specific runtime behavior out of scope unless explicitly requested.

4. **Run verification and report results**

Execute appropriate build, image build, scan, smoke-test, and generator checks; summarize what changed, what was verified, and any remaining container risks.

## Reference

For detailed guidance, examples, and constraints, see [references/706-technologies-containers-docker.md](references/706-technologies-containers-docker.md).

© Juan Antonio Breña Moral · Apache-2.0 · jabrena/plinth

Similar skills

All skills for DevOps and infrastructure →

From the same set123

The whole set →
183-java-observability-tracing-opentelemetry 183-java-observability-tracing-opentelemetry guides OpenTelemetry distributed tracing setup in Java services with context propagation and semantic attributes. CX Codex +1 253installs 305-frameworks-spring-boot-modulith 305-frameworks-spring-boot-modulith guides Spring Modulith work in Spring Boot modular monoliths, from module boundaries to events and tests. Use it when reviewing or reshaping the architecture. CX Codex +1 245installs 704-technologies-sql The 704-technologies-sql skill guides schema design, SQL queries, indexes, and migrations without tying the advice to a Java framework. Use it for database reviews and changes. CX Codex +1 227installs 300-frameworks-spring-boot-create-project 300-frameworks-spring-boot-create-project scaffolds Maven-based Spring Boot 4.0.x projects using Java 25 and SDKMAN tools. Useful when starting new backend services with automated build verification. CX Codex +1 225installs 003-skills-inventory 003-skills-inventory generates a Java system prompt checklist document in INVENTORY-SKILLS-JAVA.md from skills.xml. Useful for maintaining skill registries in Plinth Toolkit. CX Codex +1 224installs 001-commands-inventory The 001-commands-inventory skill builds INVENTORY-COMMANDS-JAVA.md from an embedded Java command template. Use it when a project needs a fixed command inventory checklist. CX Codex +1 220installs 152-java-performance-gatling 152-java-performance-gatling sets up Gatling load testing in a Java Maven project: dependencies, the Maven plugin, simulations, and runs via ./mvnw gatling:test. CX Codex +1 219installs 004-commands-installation 004-commands-installation copies embedded project commands into selected assistant directories through an interactive setup prompt. CX Codex +1 219installs

Project sponsors

Companies that keep this analytics open