What it does
Create Dockerfiles, docker-compose configurations, and container workflows for Python projects with UV
Skills ZICQ category:DevOps & Cloud docker-workflows
Create Dockerfiles, docker-compose configurations, and container workflows for Python projects with UV. Use when containerizing applications, setting up development environments, or deploying with Docker.
Official URL:skills.sh
Intro in this page language first. The official description stays in its original wording; we do not rewrite SKILL.md.
Create Dockerfiles, docker-compose configurations, and container workflows for Python projects with UV
containerizing applications, setting up development environments, or deploying with Docker
Per Agent Skills progressive disclosure: name and description load at startup (~100 tokens); the full SKILL.md body loads when the skill activates; scripts/, references/, and assets/ load only as needed. This file's sections: Docker Workflows Skill; When to Activate; Quick Commands; Build image; Run container; View logs. It includes spec-recommended sections: step-by-step instructions.
File analysis: instruction-only skill (SKILL.md). The agent loads the full body when activated.
Docker Workflows SkillWhen to ActivateQuick CommandsBuild imageRun containerView logsExecute in containerStop and removeClean upBasic Dockerfile (Python/UV)Install UVCopy dependency files (layer caching)
Source category:skills.sh agent-skill
namedocker-workflowsdescriptionInvocation syntax and available tools depend on your Agent client. Client integration guide ↗
Choose the target agent and installation scope, keep referenced package files, then verify the skill appears in the client's catalog.
Copy these instructions to a compatible agent and confirm the target directory matches your client.
Install the agent skill "docker-workflows" into my project. The full SKILL.md and official description are at https://zicq.com/en/skills/skl-b947933dfe4a5831-Docker-Workflows.html Save it as .cursor/skills/docker-workflows/SKILL.md or .claude/skills/docker-workflows/SKILL.md and keep the frontmatter name and description exactly as-is.
Requires Node.js and npx. First inspect the repository's skill list to confirm the name.
npx skills add 'https://github.com/autumnsgrove/lattice' --list
npx skills add 'https://github.com/autumnsgrove/lattice' --skill 'docker-workflows'
The CLI lets you choose the agent interactively. The default scope is the project; use -g for user scope. Confirm package availability with the discovery command, then use npx skills list to inspect installed skills.
Activate this skill when:
# Build image
docker build -t my-app:latest .
# Run container
docker run -d -p 8000:8000 --name my-app my-app:latest
# View logs
docker logs -f my-app
# Execute in container
docker exec -it my-app bash
# Stop and remove
docker stop my-app && docker rm my-app
# Clean up
docker system prune -a
FROM python:3.11-slim
WORKDIR /app
# Install UV
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
# Copy dependency files (layer caching)
COPY pyproject.toml uv.lock ./
# Install dependencies
RUN uv sync --frozen --no-dev
# Copy application
COPY . .
EXPOSE 8000
CMD ["uv", "run", "python", "main.py"]
# Stage 1: Builder
FROM python:3.11-slim AS builder
WORKDIR /app
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev
COPY . .
# Stage 2: Runtime
FROM python:3.11-slim
WORKDIR /app
# Create non-root user
RUN useradd -m -u 1000 appuser && chown appuser:appuser /app
# Copy from builder
COPY --from=builder /app/.venv /app/.venv
COPY --from=builder /app /app
USER appuser
ENV PATH="/app/.venv/bin:$PATH"
EXPOSE 8000
CMD ["python", "main.py"]
__pycache__/
*.pyc
.git/
.env
.venv/
venv/
*.log
.DS_Store
.pytest_cache/
tests/
docs/
*.md
version: '3.8'
services:
app:
build: .
ports:
- "8000:8000"
environment:
- DATABASE_URL=postgresql://user:password@db:5432/myapp
depends_on:
- db
volumes:
- ./app:/app # Development: live reload
db:
image: postgres:15-alpine
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
- POSTGRES_DB=myapp
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
volumes:
postgres_data:
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f app
# Stop services
docker-compose down
# Rebuild and restart
docker-compose up -d --build
# Run command in service
docker-compose exec app bash
# Remove volumes (deletes data!)
docker-compose down -v
# Good: Dependencies cached separately
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev
COPY . .
# Bad: Cache invalidated on every code change
COPY . .
RUN uv sync --frozen --no-dev
# Use official slim images
FROM python:3.11-slim
# Run as non-root
RUN useradd -m -u 1000 appuser
USER appuser
# Don't include secrets in images
# Use runtime environment variables instead
# Pass via environment
docker run -e API_KEY=secret my-app
# Use env file
docker run --env-file .env.production my-app
# With compose
services:
app:
env_file:
- .env.production
# Named volume (data persistence)
docker run -v postgres_data:/var/lib/postgresql/data postgres
# Bind mount (development)
docker run -v $(pwd)/app:/app my-app
# Interactive shell
docker exec -it container_name bash
# Real-time logs
docker logs -f --tail 100 container_name
# Inspect configuration
docker inspect container_name
# Resource usage
docker stats container_name
# Copy files
docker cp container_name:/app/logs ./logs
docker logs container_name # Check for errors
docker run -it app:v1 bash # Debug interactively
docker ps # Check port mapping
docker inspect container_name # Check network config
docker system df # Check usage
docker system prune -a # Clean everything
See AgentUsage/docker_guide.md for complete documentation including:
DevOps & Cloud
Essential Docker commands and workflows for container management, image operations, and debugging.
DevOps & Cloud
Discover and install skills from the open agent skills ecosystem. Use when: (1) user asks "how do I do X" where X might have an existing ski…
DevOps & Cloud
Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end. USE FOR: foundry, azd a…
DevOps & Cloud
Execute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files. DO NOT us…