title: Docker Compose volume not mount for mysql image
body: <p>I am trying to create a new Docker image with <code>docker-compose.yml</code> file. Here is my <code>docker-compose.yml</code> file.</p>
  
  <pre><code>version: '3.6'
  services:
    php-fpm:
        build:
         context: ./images/php-fpm/
         dockerfile: Dockerfile
        container_name: lempdock_php-fpm_1
        volumes:
          - ./www:/var/www
        depends_on:
          - redis
          - mysql
    nginx:
        build:
          context: ./images/nginx
          dockerfile: Dockerfile
        container_name: lempdock_nginx_1
        ports:
          - "80:80"
          - "443:443"
        volumes:
          - ./www:/var/www
          - ./images/nginx/nginx.conf:/etc/nginx/nginx.conf
          - ./images/nginx/sites/:/etc/nginx/sites-available
          - ./images/nginx/conf.d/:/etc/nginx/conf.d
        external_links:
          - lemp_dock_nginx_1
        depends_on:
          - php-fpm
    mysql:
        build:
          context: ./images/mysql
          dockerfile: Dockerfile
        container_name: lempdock_mysql_1
        restart: always
        volumes:
          - ./data/mysql:/var/lib/mysql
        external_links:
          - lempdock_mysql_1
        ports:
          - "33066:3306"
        expose:
          - 3306
    redis:
        image: redis
        container_name: lempdock_redis_1
        ports:
          - "6379:6379"
        volumes:
          - ./data/redis:/data/redis
        external_links:
          - lempdock_redis_1
  </code></pre>
  
  <p>This is my folder structure</p>
  
  <pre><code>- /data
  ---- /mysql
  ---- /redis
  - /images # contain other sub foldes with Dockerfile
  - /lemp
  -/www # to contain my souce code
  </code></pre>
  
  <p>As per my <code>docker-compose.yml</code> file, my <code>www</code> folder from root mounted and synced properly with <code>php-fpm</code> and <code>nging</code> docker image, but my <code>mysql</code> data not synced with <code>data/mysql</code> folder.</p>
  
  <p>What I am missing here and How can I get my MySQL data folder mounted to my host computers <code>data/mysql</code> folder?</p>
  
  <p>This is the Github link <a href="https://github.com/arifulhb/lempdock" rel="nofollow noreferrer">https://github.com/arifulhb/lempdock</a> if anyone wants to check out this.</p>