dockerize

Generates Dockerfiles, docker-compose configs, and .dockerignore files for containerizing applications.

Updated Jun 2, 2026
One-click install
npx skills add https://github.com/medispis/opencode-config --skill dockerize-medispis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dockerize
Source: https://github.com/medispis/opencode-config/tree/main/skills/dockerize
Command: npx skills add https://github.com/medispis/opencode-config --skill dockerize-medispis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually writing Dockerfiles and docker-compose configurations is error-prone and often leads to bloated images, leaked secrets, and missing security hardening. This Skill automates the creation of optimized containerization setups tailored to your project's language and framework. ## Core Features & Use Cases - Dockerfile Generation: Detects your project's language, framework, and dependencies to produce multi-stage builds with proper layer caching, non-root users, and health checks. - docker-compose Configuration: Creates service definitions with volume mounts, environment variables, networks, and dependency ordering. - Secret Safety: Enforces best practices so secrets are never baked into images, using env_file references and .dockerignore exclusions instead. - Use Case: You have a Node.js API with a PostgreSQL database and Redis cache. Use this Skill to generate a production Dockerfile, a docker-compose.yml wiring all three services together, and a .dockerignore excluding node_modules and .env files. ## Quick Start Containerize my Node.js application by generating a Dockerfile, docker-compose.yml with a database service, and a .dockerignore file.

Frequently Asked Questions about dockerize

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

FAQPage Schema
How do I create a Dockerfile for my application?

Detect your project's language, framework, and entry points, then generate a Dockerfile with an appropriate base image, multi-stage build, and non-root user. The Skill handles layer caching, health checks, and pinned dependency versions automatically.

How do I add services to a docker-compose file?

Define each service with its image or build context, volume mounts, environment variables, and dependency ordering using depends_on. The Skill generates docker-compose.yml with networks, named volumes, and env_file references for configuration.

Should I use multi-stage builds for Docker images?

Multi-stage builds are recommended for compiled languages and frameworks with build steps, since they separate build tooling from the runtime image. This produces smaller final images containing only production artifacts and dependencies.

How do I keep secrets out of Docker images?

Never COPY .env files or bake secrets into image layers. Pass secrets as runtime environment variables, reference .env via env_file in docker-compose, add .env to .dockerignore, and document required variables in .env.example.

Why should Docker containers run as a non-root user?

Running as non-root limits the damage an attacker can do if the container is compromised, since processes lack host root privileges. The generated Dockerfiles switch to a non-root user before the entrypoint, following standard container hardening practice.