Run PHP and MySQL in Docker
It works on my machine. Steps 1. Create a new directory . ├── docker-compose.yml ├── Dockerfile ├── .env.example ├── README.md └── src/ └── index.php 2. Create docker-compose.yml version: '3.8' services: app: build: . container_name: php_app ports: - "8080:80" volumes: - ./src:/var/www/html depends_on: db: condition: service_healthy env_file: - .env networks: - app_network db: image: mysql:8.0...
Original Source
Read the full article at Dev →KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.