add-docker-compose

Generate Dockerfiles and docker-compose.yml for Spring Boot 4 services with health checks.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/dprice-dev/claude-java-skills --skill add-docker-compose
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: add-docker-compose
Source: https://github.com/dprice-dev/claude-java-skills/tree/main/.claude/skills/add-docker-compose
Command: npx skills add https://github.com/dprice-dev/claude-java-skills --skill add-docker-compose

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill removes the guesswork and fragile setup involved in running Spring Boot 4 applications locally with Docker by generating consistent Dockerfiles and a Docker Compose stack with health checks and correct service wiring.

Core Features & Use Cases

  • Build-time containerization: Generates a multi-stage Dockerfile pattern (JDK build stage, JRE runtime stage) suitable for Spring Boot 4 services.
  • Local orchestration with health-aware startup: Produces a docker-compose.yml that wires databases and service dependencies using healthy startup ordering.
  • Single-service and gateway-ready multi-service layouts: Supports both one app + one database and a multi-service architecture with an API gateway, including correct internal DNS and environment-variable mapping.

Quick Start

Ask your Claude Code agent to containerize your project for local development and generate a Docker Compose setup: "Use add-docker-compose to create Dockerfiles and a docker-compose.yml for my Spring Boot 4 services, wiring databases, health checks, and local gateway-to-service connectivity."

Frequently Asked Questions about add-docker-compose

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I containerize a Spring Boot 4 application with Docker Compose for local development?▼

To set up Docker Compose for a Spring Boot 4 app and PostgreSQL, this Skill generates a docker-compose.yml that uses pinned image versions, health checks with service_healthy ordering, and Docker-internal service DNS to ensure the database is ready before the application starts.

How do I configure health checks in Docker Compose to control Spring Boot service startup order?▼

Configuring health checks in Docker Compose with service_healthy ordering ensures Spring Boot services wait for dependencies like PostgreSQL to be fully ready, preventing connection failures during local multi-service startup.

Can I use this Docker Compose setup for a multi-service Spring Boot architecture with an API gateway?▼

Yes, this Skill supports multi-service gateway architectures by generating a docker-compose.yml with correct internal DNS and environment-variable mapping to wire an API gateway to backend Spring Boot 4 services for consistent local startup.

Does this Docker Compose approach use Kubernetes or Testcontainers for local development?▼

No, this approach deliberately avoids Kubernetes and Testcontainers production orchestration, focusing instead on generating Dockerfiles and a Docker Compose stack tailored for reliable local development of Spring Boot 4 services.

What is the best way to generate a multi-stage Dockerfile for a Spring Boot 4 service?▼

The best way to generate a Spring Boot 4 Dockerfile is using a multi-stage pattern with a JDK build stage and a JRE runtime stage, which this Skill produces to create optimized container images for local development.