docker-1-basic-dockerfile-patterns
Sub-skill of docker: 1. Basic Dockerfile Patterns.
Best use case
docker-1-basic-dockerfile-patterns is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of docker: 1. Basic Dockerfile Patterns.
Teams using docker-1-basic-dockerfile-patterns should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/1-basic-dockerfile-patterns/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How docker-1-basic-dockerfile-patterns Compares
| Feature / Agent | docker-1-basic-dockerfile-patterns | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sub-skill of docker: 1. Basic Dockerfile Patterns.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 1. Basic Dockerfile Patterns
## 1. Basic Dockerfile Patterns
**Simple Application Dockerfile:**
```dockerfile
# Base image with specific version
FROM python:3.12-slim
# Set working directory
WORKDIR /app
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy dependency files first (better caching)
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Create non-root user
RUN useradd --create-home appuser && chown -R appuser:appuser /app
USER appuser
# Expose port
EXPOSE 8000
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8000/health || exit 1
# Default command
CMD ["python", "main.py"]
```
**Node.js Application Dockerfile:**
```dockerfile
FROM node:20-alpine
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci --only=production
# Copy application
COPY . .
# Non-root user (alpine already has 'node' user)
USER node
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s \
CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1
CMD ["node", "server.js"]
```Related Skills
taxact-browser-automation-patterns
Patterns for automating TaxAct Business online (Ionic SPA) via Chrome browser MCP tools — field interaction, navigation, shadow DOM handling
shell-script-hardening-patterns
Harden Bash automation scripts with TDD-first static and behavioral checks, safe Python invocation via uv, locking, persistent state, and review-driven correction loops.
repo-cleanup-conflict-resolution-patterns
Sub-skill of repo-cleanup: Conflict Resolution Patterns (+2).
mkdocs-basic-code-block
Sub-skill of mkdocs: Basic Code Block.
web-artifacts-builder-basic-template
Sub-skill of web-artifacts-builder: Basic Template.
usage-tracker-1-basic-usage-logging
Sub-skill of usage-tracker: 1. Basic Usage Logging (+1).
parallel-batch-executor-1-basic-parallel-execution-with-xargs
Parallel batch processing with xargs. Use when running commands concurrently over a list of items with controlled parallelism.
interactive-menu-builder-1-basic-menu-structure
Sub-skill of interactive-menu-builder: 1. Basic Menu Structure.
nextflow-pipelines-docker-issues
Sub-skill of nextflow-pipelines: Docker issues (+2).
git-advanced-9-monorepo-patterns
Sub-skill of git-advanced: 9. Monorepo Patterns.
docker-common-issues-and-solutions
Sub-skill of docker: Common Issues and Solutions (+1).
docker-6-development-workflow-scripts
Sub-skill of docker: 6. Development Workflow Scripts.