Skip to main content

Optimize Docker Build Cache

Skill Verified Active

Optimize Docker build times using layer caching, multi-stage builds, BuildKit features, and dependency-first copy patterns. Applicable to R, Node.js, and Python projects. Use when Docker builds are slow due to repeated package installations, when rebuilds reinstall all dependencies on every code change, when image sizes are unnecessarily large, or when CI/CD pipeline builds are a bottleneck.

Purpose

To significantly reduce Docker build times and image sizes by applying proven optimization techniques, making CI/CD pipelines faster and more efficient.

Features

  • Optimize Docker build times
  • Implement layer caching effectively
  • Utilize multi-stage builds for smaller images
  • Leverage BuildKit features for parallel builds
  • Apply dependency-first copy patterns

Use Cases

  • When Docker builds are slow due to repeated package installations
  • When rebuilds reinstall all dependencies on every code change
  • When image sizes are unnecessarily large
  • When CI/CD pipeline builds are a bottleneck

Non-Goals

  • Creating new Dockerfiles from scratch (though related skills exist)
  • Optimizing runtime performance of Docker containers
  • Managing Docker infrastructure or orchestration

Installation

/plugin install agent-almanac@pjt222-agent-almanac

Quality Score

Verified
99 /100
Analyzed about 12 hours ago

Trust Signals

Last commit1 day ago
Stars14
LicenseMIT
Status
View Source

Similar Extensions

Containerize MCP Server

100

Containerize an R-based MCP (Model Context Protocol) server using Docker. Covers mcptools integration, port exposure, stdio vs HTTP transport, and connecting Claude Code to the containerized server. Use when deploying an R MCP server without requiring a local R installation, creating a reproducible MCP server environment, running MCP servers alongside other containerized services, or distributing an MCP server to other developers.

Skill
pjt222

Create Dockerfile

98

Create general-purpose Dockerfiles for Node.js, Python, Go, Rust, and Java projects. Covers base image selection, dependency installation, user permissions, COPY patterns, ENTRYPOINT vs CMD, and .dockerignore. Use when containerizing an application for the first time, creating a consistent build/runtime environment, preparing an app for cloud deployment or Docker Compose, or when no existing Dockerfile is present in the project.

Skill
pjt222

Azure Container Registry SDK for Python

100

Azure Container Registry SDK for Python. Use for managing container images, artifacts, and repositories. Triggers: "azure-containerregistry", "ContainerRegistryClient", "container images", "docker registry", "ACR".

Skill
microsoft

Build Custom Mcp Server

100

Build a custom MCP (Model Context Protocol) server that exposes domain-specific tools to AI assistants. Covers server implementation in Node.js or R, tool definitions, transport configuration, and testing with Claude Code. Use when you need to expose custom functionality beyond what mcptools provides, when building specialized domain-specific AI integrations, or when wrapping existing APIs or services as MCP tools.

Skill
pjt222

Create Multistage Dockerfile

99

Create multi-stage Dockerfiles that separate build and runtime environments for minimal production images. Covers builder/runtime stage separation, artifact copying, scratch/distroless/alpine targets, and size comparison. Use when production images are too large, when build tools are included in the final image, when you need separate dev and prod images from one Dockerfile, or when deploying to constrained environments like edge or serverless.

Skill
pjt222

Docker Development

98

Docker and container development agent skill and plugin for Dockerfile optimization, docker-compose orchestration, multi-stage builds, and container security hardening. Use when: user wants to optimize a Dockerfile, create or improve docker-compose configurations, implement multi-stage builds, audit container security, reduce image size, or follow container best practices. Covers build performance, layer caching, secret management, and production-ready container patterns.

Skill
alirezarezvani

© 2025 SkillRepo · Find the right skill, skip the noise.