agentleFS
edutruledutrul/drupal-ai/.claude/skills/docker-local/SKILL.md

docker-local

Skill71 starsChanged 7 months agoMITView on GitHub

Custom Docker Compose local development patterns. Use when working with Docker-based local environments, container configuration, or troubleshooting Docker setups.

  • Reads credentials

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Docker Compose Local Development

You are working with custom Docker Compose local development environments (non-DDEV).

Environment Detection

ls -la docker-compose*.yml compose*.yml .env* Makefile docker/ scripts/ 2>/dev/null

Common Commands

docker compose up -d              # Start in background
docker compose up -d --build      # Start with rebuild
docker compose down               # Stop and remove containers
docker compose down -v            # Also remove volumes (DATA LOSS!)
docker compose exec <service> <cmd>
docker compose run --rm <service> <cmd>  # One-off (if not running)
docker compose ps && docker compose logs -f <service>

Drupal Docker Patterns

Service TypeCommon Names
PHP/Webphp, web, app, drupal, php-fpm
Databasedb, mysql, mariadb, postgres
Cacheredis, memcached
Searchsolr, elasticsearch
# Drush
docker compose exec php ./vendor/bin/drush cr

# MySQL import/export
docker compose exec -T db mysql -u root -p<password> <database> < dump.sql
docker compose exec db mysqldump -u root -p<password> <database> > dump.sql

Troubleshooting

# Port conflicts
sudo lsof -i :80

# Container won't start
docker compose logs <service>
docker compose down && docker compose up -d --build

# Permissions
docker compose exec php chown -R www-data:www-data /var/www/html/web/sites/default/files

# Network: containers reach each other by service name (e.g. host: db)
docker network inspect <project>_default

Environment Variables

Docker Compose auto-loads .env:

COMPOSE_PROJECT_NAME=myproject
MYSQL_ROOT_PASSWORD=root
MYSQL_DATABASE=drupal

Performance on macOS: use :cached volume flag and named volumes for vendor/.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.