{"id":47910155,"url":"https://github.com/whilesmartphp/laravel-docker-dev","last_synced_at":"2026-04-04T05:15:37.923Z","repository":{"id":343113891,"uuid":"1154646669","full_name":"whilesmartphp/laravel-docker-dev","owner":"whilesmartphp","description":"Development image for laravel","archived":false,"fork":false,"pushed_at":"2026-03-30T18:04:28.000Z","size":22,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-30T20:09:43.481Z","etag":null,"topics":["docker","laravel"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/whilesmartphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-10T16:15:27.000Z","updated_at":"2026-03-30T18:04:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/whilesmartphp/laravel-docker-dev","commit_stats":null,"previous_names":["whilesmartphp/laravel-docker-dev"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/whilesmartphp/laravel-docker-dev","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whilesmartphp%2Flaravel-docker-dev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whilesmartphp%2Flaravel-docker-dev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whilesmartphp%2Flaravel-docker-dev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whilesmartphp%2Flaravel-docker-dev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whilesmartphp","download_url":"https://codeload.github.com/whilesmartphp/laravel-docker-dev/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whilesmartphp%2Flaravel-docker-dev/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31388403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","laravel"],"created_at":"2026-04-04T05:15:37.382Z","updated_at":"2026-04-04T05:15:37.918Z","avatar_url":"https://github.com/whilesmartphp.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Dev Docker Image\n\nCentralized Laravel development Docker images with two variants:\n\n- **App** — Full Laravel application image with nginx, PHP-FPM, and supervisor\n- **Package** — Lightweight CLI image for package development and testing\n\n## Images\n\n```\n# App variant (nginx + PHP-FPM + supervisor)\nghcr.io/whilesmartphp/laravel-dev:8.4\nghcr.io/whilesmartphp/laravel-dev:8.2\n\n# Package variant (PHP CLI only)\nghcr.io/whilesmartphp/laravel-dev:package-8.4\nghcr.io/whilesmartphp/laravel-dev:package-8.2\n```\n\n## App Variant\n\nFull-stack Laravel development environment.\n\n### What's Included\n\n- **PHP-FPM** (8.2 or 8.4)\n- **Nginx** with Laravel-optimized config\n- **Supervisor** managing both processes\n- **Composer** (latest)\n- **PHP Extensions:** pdo_mysql, pdo_pgsql, mbstring, exif, pcntl, bcmath, gd, zip\n- **Shared `laravel.mk`** at `/usr/local/share/laravel.mk`\n\n### docker-compose.yml\n\n```yaml\nservices:\n  app:\n    image: ghcr.io/whilesmartphp/laravel-dev:8.4\n    build:\n      context: .\n      dockerfile_inline: |\n        FROM ghcr.io/whilesmartphp/laravel-dev:8.4\n      args:\n        HOST_UID: '${HOST_UID:-1000}'\n        HOST_GID: '${HOST_GID:-1000}'\n    ports:\n      - '${APP_PORT:-8000}:80'\n    volumes:\n      - '.:/var/www/html'\n```\n\n### Makefile\n\nCopy `laravel.mk` into your project or include it:\n\n```makefile\ninclude laravel.mk\n```\n\nPort resolution is automatic — `make up` finds available ports starting from 8000 and stores them in `.ports`.\n\n### Customizing for Your Project\n\n`laravel.mk` exposes hook variables you can set **before** the `include` to customize behavior without overriding targets:\n\n```makefile\n# Extra port defaults\nDEFAULT_DB_PORT ?= 3306\nDEFAULT_PMA_PORT ?= 8080\n\n# Add extra ports to .ports file\nEXTRA_PORTS_SCRIPT = \\\n\tDB_PORT=$$(port=$(DEFAULT_DB_PORT); while nc -z 127.0.0.1 $$port 2\u003e/dev/null || lsof -i :$$port \u003e/dev/null 2\u003e\u00261; do port=$$((port + 1)); done; echo $$port); \\\n\tPMA_PORT=$$(port=$(DEFAULT_PMA_PORT); while nc -z 127.0.0.1 $$port 2\u003e/dev/null || lsof -i :$$port \u003e/dev/null 2\u003e\u00261; do port=$$((port + 1)); done; echo $$port); \\\n\techo \"FORWARD_DB_PORT=$$DB_PORT\" \u003e\u003e $(PORTS_FILE); \\\n\techo \"PMA_PORT=$$PMA_PORT\" \u003e\u003e $(PORTS_FILE);\n\n# Show extra service URLs on 'make up'\nEXTRA_UP_INFO = \\\n\techo \"  phpMyAdmin: http://localhost:$$PMA_PORT\" \u0026\u0026 \\\n\techo \"  MySQL:      localhost:$$FORWARD_DB_PORT\"\n\n# Custom test and lint commands\nTEST_CMD = php artisan test --coverage\nLINT_CMD = composer phpcs:test \u0026\u0026 composer phpmd \u0026\u0026 composer pint:test\n\ninclude laravel.mk\n```\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `EXTRA_PORTS_SCRIPT` | *(empty)* | Shell script appended to `.ports` generation |\n| `EXTRA_UP_INFO` | *(empty)* | Extra `echo` commands shown after `make up` |\n| `TEST_CMD` | `php artisan test` | Command used by `make test` |\n| `LINT_CMD` | `composer pint:test` | Command used by `make lint` |\n\n### App Targets\n\n| Target | Description |\n|--------|-------------|\n| `up` | Start the application (auto port resolution) |\n| `setup` | First-time setup (up + install + key + migrate + seed) |\n| `restart` | Restart the application |\n| `ports` | Show current port assignments |\n| `reset-ports` | Clear ports and find new available ones |\n| `composer-install` | Install composer dependencies |\n| `composer-update` | Update composer dependencies |\n| `test` | Run tests |\n| `lint` | Check code formatting (Pint) |\n| `lint-fix` | Fix code formatting (Pint) |\n| `migrate` | Run database migrations |\n| `migrate-fresh` | Drop all tables and re-run migrations |\n| `seed` | Seed the database |\n| `migrate-fresh-seed` | Fresh migrations with seeders |\n| `optimize` | Optimize the application |\n| `tinker` | Start a tinker session |\n| `bash` | Open a shell in the container |\n| `fix-permissions` | Fix storage/cache permissions |\n| `logs` | Tail application logs |\n| `down` | Stop and remove containers |\n| `stop` | Stop containers |\n| `clean` | Remove everything (containers, images, volumes) |\n| `help` | Show available targets |\n\n---\n\n## Package Variant\n\nLightweight image for developing and testing Laravel packages with Orchestra Testbench.\n\n### What's Included\n\n- **PHP CLI** (8.2 or 8.4)\n- **Composer** (latest)\n- **PHP Extensions:** pdo_mysql, pdo_pgsql, mbstring, zip\n- **Shared `package.mk`** at `/usr/local/share/package.mk`\n\n### docker-compose.yml\n\n```yaml\nname: my-package\nservices:\n  app:\n    image: ghcr.io/whilesmartphp/laravel-dev:package-8.4\n    volumes:\n      - .:/app\n    working_dir: /app\n    command: tail -f /dev/null\n    environment:\n      - APP_ENV=testing\n```\n\n### Makefile\n\nInclude `package.mk` from the image:\n\n```makefile\ninclude package.mk\n```\n\nOr override defaults before the include:\n\n```makefile\nTEST_CMD = ./vendor/bin/testbench package:test --parallel\nLINT_FIX_CMD = ./vendor/bin/pint\n\ninclude package.mk\n```\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `TEST_CMD` | `./vendor/bin/testbench package:test` | Command used by `make test` |\n| `LINT_CMD` | `composer pint:test` | Command used by `make lint` |\n| `LINT_FIX_CMD` | `composer pint` | Command used by `make lint-fix` |\n\n### Package Targets\n\n| Target | Description |\n|--------|-------------|\n| `up` | Start containers |\n| `down` | Stop and remove containers |\n| `restart` | Restart containers |\n| `logs` | Show container logs |\n| `bash` | Open a shell in the container |\n| `install` | Install dependencies (starts containers first) |\n| `update` | Update dependencies |\n| `test` | Run tests |\n| `lint` | Check code formatting |\n| `lint-fix` | Fix code formatting |\n| `build` | Build workbench |\n| `serve` | Start development server |\n| `autoload` | Dump composer autoloader |\n| `fresh` | Fresh start (down + up + install) |\n| `setup` | Complete setup (fresh + test) |\n| `check` | Run all checks (lint + test) |\n| `clean` | Remove everything (containers, images, volumes) |\n| `help` | Show available targets |\n\n---\n\n## Production\n\nFor production, use [`ghcr.io/whilesmartphp/frankenphp`](https://github.com/whilesmartphp/frakenphp) instead.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhilesmartphp%2Flaravel-docker-dev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhilesmartphp%2Flaravel-docker-dev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhilesmartphp%2Flaravel-docker-dev/lists"}