I am trying to mount MySql logs on my host machine, using MySql official image. But it seems like its not mounting properly, the directory is always empty, however, the other volumes that I am mounting are working properly. Am I missing something?
version: "2"
services:
mysql:
image: mysql:5.7
restart: always
environment:
MYSQL_ROOT_PASSWORD: testing
MYSQL_DATABASE: testing
MYSQL_USER: test
MYSQL_PASSWORD: testing
ports:
- 3306:3306
volumes:
- ./.data/mysql/logs:/var/log/mysql
- ./.data/mysql/data:/var/lib/mysql
- ./mysql/conf.d:/etc/mysql/conf.d
- ./mysql/initdb.d:/docker-entrypoint-initdb.d