How to Create PHP Development Environments with Docker Compose
summary
Step-by-step recipe for a working PHP dev stack using Docker Compose: a Dockerfile builds a PHP 7.4 FPM image that installs required PHP extensions and copies Composer from the official composer image, creates a user matching host UID for correct file permissions, and the docker-compose.yml wires three services — Nginx (Alpine) port-mapped to localhost:8000, MySQL 5.7 with a docker-entrypoint-initdb.d SQL dump that preloads data for a Laravel 6 app. Commands shown: git download, docker-compose up, then docker-compose exec app composer install and php artisan key:generate, after which the Travellists app responds in the browser.
AI-written summary · about
chapters (5)
- 0:00How to Create PHP Development Environments with Docker Compose
- 1:13Introduction Development Environments, PHP, and Docker Compose
- 8:57Case Study application
- 12:53Setting Up a docker-compose.yml Configuring our service containers, volumes and networks
- 30:40Part 3 Demo Time
related talks
49mDocker & PHP development and deployment
25mDocker for PHP Developers
02h 14mRunning PHP in Docker containers
46mDocker, Kubernetes, and OpenShift for PHP Developers
49mTools to Get Started with a Drupal 8 Project
42mServerless: a backend thing that gives superpowers to frontend developers
35mPractical PHP Deployment with Jenkins
47mGitLab and PHP? It Works! Tips, Tricks and Learnings
