Sub-skill of docker: 1. Basic Dockerfile Patterns.
Install to Claude Code
npx -y skills add vamseeachanta/workspace-hub --skill 1-basic-dockerfile-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of 1 Basic Dockerfile Patterns?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/vamseeachanta-1-basic-dockerfile-patterns)More formats (shields.io, HTML) on the badges page.
---
name: docker-1-basic-dockerfile-patterns
description: 'Sub-skill of docker: 1. Basic Dockerfile Patterns.'
version: 1.0.0
category: operations
type: reference
scripts_exempt: true
---
# 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"]
```
Is this your skill, or is something wrong with this listing? . Author removals are honored within 72 hours.
Scanned 9/9/2026
No comments yet. Be the first to comment!