Mysql getting error when am trying to mount it for windows

Greeting Guys,

I hope you are doing well, but unfortunately am not , I already installed docker for windows by following official documentation, and enabled all required settings mentioned on documents, But when I am trying to run my docker-compose file am getting an error that mysql exited with error code 1.

  • But note that on linux OS the same docker-compose file is running well.

  • Here is my docker-compose file

    version: “2”
    services:
    php-apache:

    build:

    context: ./Dockerfiles/Php-Apache/

    dockerfile: Dockerfile

    image: *******************************
    restart: always
    ports:

    • :
      volumes:

    - “***********:/var/www/html”

    • “./:confused:
    • “./apache_log:/var/log/apache2/”
      depends_on:
    • mysql
      networks:
      main:
      aliases:
      • php-apache

    mysql:

    build:

    context: ./Dockerfiles/MySQL/

    dockerfile: Dockerfile

    image: ***********************
    restart: always
    ports:
    - “:
    volumes:

    • “./mysql_db_folder:/var/lib/mysql”
      environment:
      MYSQL_USER: **********
      MYSQL_PASSWORD: **********
      MYSQL_DATABASE: *********
      MYSQL_ROOT_HOST: “****”
      MYSQL_ROOT_PASSWORD: **********
    # MYSQL_LOG_CONSOLE : 'true'
    

    depends_on:

    • mongo
      networks:
      main:
      aliases:
      • mysql

    mongo:

    image: mongo:3.4

    image: *************************
    restart: always
    ports:

    • :
      volumes:
    • “********:/var/lib/mongodb”
      environment:
      MONGO_INITDB_ROOT_USERNAME: ******
      MONGO_INITDB_ROOT_PASSWORD: **************
    # MONGO_INITDB_DATABASE: *********
    

    depends_on:

    • redis
      networks:
      main:
      aliases:
      • mongo

    redis:

    image: redis:3

    image: ************************
    restart: always
    ports:

    • :
      volumes:
    • “./redis_db_folder:/data”
      networks:
      main:
      aliases:
      • redis

    phpmyadmin:
    image: *************************
    restart: always
    depends_on:

    • mysql
      ports:
    • “*****:****”
      environment:
      PMA_PORT: ****
      PMA_HOST: ****
      PMA_USER: ****
      PMA_PASSWORD: ************
      networks:
      main:
      aliases:
      - phpmyadmin

    redis_browser:
    image: *****************
    restart: always
    depends_on:

    • redis
      ports:
    • :
      command: --url redis://redis:port
      networks:
      main:
      aliases:
      - redis_browser

networks:
main: