mysql 8 socket docker compose windows

Solutions on MaxInterview for mysql 8 socket docker compose windows by the best coders in the world

showing results for - "mysql 8 socket docker compose windows"
Carole
04 Apr 2020
1#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
2version: '3.9'
3services:
4
5  php:
6    image: docker-dev
7    build:
8      context: .
9      dockerfile: ./Dockerfile
10    ports:
11      - "80:80"
12    volumes:
13      - "./../code/htdocs:/var/www/html:rw"
14    links:
15      - db
16  
17  db:
18    image: mysql:8.0.22
19    command: --default-authentication-plugin=mysql_native_password
20    ports:
21      - "3306:3306"
22    environment:
23      MYSQL_USER: docker
24      MYSQL_PASSWORD: docker
25      MYSQL_ROOT_PASSWORD: example
26    volumes:
27      - dev-db:/var/lib/mysql
28volumes:
29  dev-db:
Kody
12 Jun 2018
1# For docker run adding this should work theoretically - 
2--socket=/tmp/mysql.sock
3
4# In practice you'll probably need to look at mounting a docker volume
5# and using that