mcpField
D
docker-local

docker-local

github.com/edutrulCloud & DevOps7348 installsUpdated 21w ago
Repository

About docker-local

docker-local is a skill for working with non-DDEV Docker Compose development environments. It covers common container commands, troubleshooting, and Drupal, Drush, and MySQL examples.

Key features

  1. 01Detect Compose files and environment files
  2. 02Start, stop, and inspect containers
  3. 03Review logs and troubleshoot startup issues
  4. 04Drupal Drush and database operations

Use cases

  1. 01Start or rebuild local development services
  2. 02Check container logs and port conflicts
  3. 03Run Drush in a Drupal container
  4. 04Import or export MySQL data

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/edutrul/drupal-ai --skill docker-local

After installing, type/docker-localin Claude Code to confirm it loaded.

Bundled filesREADME.md

Details

From the project README

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/.

Comments

Markdown supported