Skills

Extend Docker Environment

Adds custom tools and personal settings to Docker through a user Dockerfile.

Install

npx skills add coleam00/Archon --skill docker-extend -g -a claude-code -y
Repository
coleam00/Archon23.8k
Category
DevOps
Updated
4d ago
License
MIT
Context cost
Lightabout 944 tokens
Runs scripts
No, instructions only

What it does

Use when: User wants to extend Docker with custom tools, personalize the Docker environment, or set up user-specific Docker customization. Triggers: 'extend docker', 'docker-extend', 'add tools to docker', 'customize docker', 'add my tools to the container', 'personalize docker setup', 'docker user setup', 'install tools in docker'. Does: Interactively sets up Dockerfile.user and docker-compose.override.yml so users can add personal tools to their Docker environment without affecting maintainer files or committing user-specific config to git.

Docker Extend

Sets up personal Docker tool customization using the project's gitignored override pattern. Your Dockerfile.user and docker-compose.override.yml are yours, never committed to git.

Step 1: Detect Context

Determine if the user is in dev (source build) or deploy (GHCR) mode:

!if [ -f docker-compose.yml ] && grep -q 'build: \.' docker-compose.yml 2>/dev/null; then echo "DEV_MODE: Building from source (root docker-compose.yml)"; elif [ -f deploy/docker-compose.yml ]; then echo "DEPLOY_MODE: Using GHCR image (deploy/docker-compose.yml)"; else echo "UNKNOWN_MODE: No docker-compose.yml found in root or deploy/"; fi

Decision:

  • DEV_MODE → work with Dockerfile.user + docker-compose.override.yml (repo root)
  • DEPLOY_MODE → work with deploy/Dockerfile.user + deploy/docker-compose.override.yml
  • UNKNOWN_MODE → ask the user which directory their docker-compose.yml lives in before proceeding

Step 2: Check Current State

DEV_MODE, check root files:

!echo "=== Dockerfile.user ===" && (cat Dockerfile.user 2>/dev/null || echo "(not found, will create from example)") && echo "" && echo "=== docker-compose.override.yml ===" && (cat docker-compose.override.yml 2>/dev/null || echo "(not found, will create from example)")

DEPLOY_MODE, check deploy/ files:

!echo "=== deploy/Dockerfile.user ===" && (cat deploy/Dockerfile.user 2>/dev/null || echo "(not found, will create from example)") && echo "" && echo "=== deploy/docker-compose.override.yml ===" && (cat deploy/docker-compose.override.yml 2>/dev/null || echo "(not found, will create from example)")

If both files already exist: Skip to Step 4 (add tools). If files are missing: Proceed to Step 3 (copy from examples). If example files are missing too: Tell the user the project hasn't added the example files yet and to check with the maintainers or the docs.

Step 3: Copy Example Files

Read the whole SKILL.md on GitHub

More in DevOps