Docker mysql挂载日志目录始终为空

时间:2016-11-25 11:36:04

标签: mysql docker docker-compose

我正在尝试使用MySql官方映像在我的主机上挂载MySql日志。但似乎它没有正确安装,目录总是空的,但是,我正在安装的其他卷正常工作。我错过了什么吗?

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

0 个答案:

没有答案