After watching some of the Docker Live 2020 talks https://docker.events.cube365.net/docker/dockercon I was inspired to take another look at using Docker for some PHP development work.

How to Create PHP Development Environments with Docker Compose

Become a Docker Power User With Microsoft Visual Studio Code

With the following docker-compose.yml you can stand up a PHP/MySQL environment with docker-compose up

version: '3'

services:
db:
container_name: DB
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: pw
MYSQL_DATABASE: MyDB
MYSQL_USER: MyDBUser
MYSQL_PASSWORD: pw
ports:
- "9906:3306"
web:
container_name: App
image: php:7.2.2-apache
depends_on:
- db
volumes:
- ./php/:/var/www/html/
ports:
- "8100:80"
stdin_open: true
tty: true