mysql 8 socket docker compose windows
#For docker-compose on windows you'll need to use a docker volume due to fs issues rather than a bind mount as per the following
version: '3.9'
services:
php:
image: docker-dev
build:
context: .
dockerfile: ./Dockerfile
ports:
- "80:80"
volumes:
- "./../code/htdocs:/var/www/html:rw"
links:
- db
db:
image: mysql:8.0.22
command: --default-authentication-plugin=mysql_native_password
ports:
- "3306:3306"
environment:
MYSQL_USER: docker
MYSQL_PASSWORD: docker
MYSQL_ROOT_PASSWORD: example
volumes:
- dev-db:/var/lib/mysql
volumes:
dev-db: