dockerfile

Generate and review Dockerfiles and docker-compose files with security and performance best practices.

3|1|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/jon23d/skillz --skill dockerfile-jon23d
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dockerfile
Source: https://github.com/jon23d/skillz/tree/main/skills/dockerfile
Command: npx skills add https://github.com/jon23d/skillz --skill dockerfile-jon23d

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you write, review, and edit Dockerfiles and docker-compose files, ensuring best practices for security, build speed, and image size.

Core Features & Use Cases

  • Best Practice Enforcement: Guides you on pinning base image versions, optimizing layer order, and using multi-stage builds.
  • Security Focus: Emphasizes never baking secrets into images and running containers as non-root users.
  • Use Case: When asked to "containerize a Node.js application," this Skill will generate a Dockerfile adhering to all the outlined best practices, including health checks and .dockerignore configuration.

Quick Start

Use the dockerfile skill to write a Dockerfile for a Python Flask application.

Frequently Asked Questions about dockerfile

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

FAQPage Schema
How do I write a Dockerfile that follows security and performance best practices?

To write a Dockerfile with best practices, you should pin base image versions, optimize layer caching, use multi-stage builds, and run containers as a non-root user. This ensures secure image deployment and faster build speeds.

What is the best way to containerize a Python Flask application?

The best way to containerize a Python Flask application is to generate a Dockerfile that includes multi-stage builds, health checks, secret management, and a properly configured `.dockerignore` file. This optimizes image size and build processes.

How do I optimize Docker layer caching and image size during containerization?

Optimize Docker layer caching and image size by ordering your build instructions strategically, using multi-stage builds, and configuring a `.dockerignore` file. This reduces build time and creates efficient container images.

Why should I avoid baking secrets into my Docker images and how do I manage them?

Avoid baking secrets into Docker images to prevent sensitive data exposure in image layers. Instead, manage secrets securely at runtime and enforce non-root execution to ensure secure image deployment.

Does writing a docker-compose file require configuring health checks and non-root execution?

Writing a docker-compose file benefits from configuring health checks and non-root execution to ensure secure and stable image deployment. Enforcing these best practices maintains container security and operational reliability.