Here I created docker container which use the
mariadb image and created three volumes as below.
version: '2.0' services: mariadb: image: mariadb:latest restart: always container_name: mariadb environment: - MYSQL_ROOT_PASSWORD=root - MYSQL_DATABASE=testdb ports: - 3307:3306 volumes: - ./database:/var/lib/mysql - ./_conf/mariadb.cnf:/etc/mysql/my.cnf:ro - ./logs:/var/log/mysql
First two volume works successfully but I can't able to find mariadb-logs files into
logs folder. I seems
logs folder showing blank on host as well as on container(/var/log/mysql). I think host folder override into docker file system.
If I remove this volume(
./logs:/var/log/mysql) from docker-compose then logs files are showing on container.
My plan is to mount
/var/log/mysql/ folder to local machine.