Docker: MariaDB / MySQL startup fails on windows host
<p>I am trying to use official mariadb docker image along with the php-fpm and nginx to run my Symfony 2 app.</p>

<p>The idea is to keep all the db files on a mounted folder. While on Mac OS it works just fine - on the Windows machine I am getting an error every time MariaDB attempts to start. The weird part is that it's actually able to create some files - I can see the ibdata1 file but the size of it is 0 bytes. There are also two aria_log files with few KBs of data which means that mysql is actually able to write there.</p>

<ul>
<li>I'm using <code>docker for windows 1.12.2 beta</code>. But tried the stable one too.</li>
<li>The windows disk I'm storing my project on is shared (through the "Shared drives" section of the Docker for Windows UI)</li>
<li>The dir is 100% writeable since nginx and even mysql itself are able to put their logs in there</li>
<li>I'm totally not "out of disk space" as logs suggest</li>
</ul>

<p>Here is my docker-compose file:</p>

<pre><code>version: '2'
services:
db:
    image: mariadb
    ports:
        - "3306:3306"
    environment:
        MYSQL_ROOT_PASSWORD: root
        MYSQL_DATABASE: test
        MYSQL_USER: root
        MYSQL_PASSWORD: root
    volumes:
        - ./docker-runtime/mysql:/var/lib/mysql
php:
    build: ./docker/php-fpm
    volumes:
        - ./:/var/www/symfony
        - ./docker-runtime/logs/symfony:/var/www/symfony/app/logs
    links:
        - db
nginx:
    build: ./docker/nginx
    ports:
        - "80:80"
    links:
        - php
    volumes_from:
        - php
    volumes:
        - ./docker-runtime/logs/nginx/:/var/log/nginx
</code></pre>

<p>And here is what the log say when I do <code>docker-compose up</code>:</p>

<pre><code>db_1     | 2016-10-18 13:14:06 7f79eed7f7c0 InnoDB: Error: Write to file ./ibdata1 failed at offset 0.
db_1     | InnoDB: 1048576 bytes should have been written, only 0 were written.
db_1     | InnoDB: Operating system error number 22.
db_1     | InnoDB: Check that your OS and file system support files of this size.
db_1     | InnoDB: Check also that the disk is not full or a disk quota exceeded.
db_1     | InnoDB: Error number 22 means 'Invalid argument'.
db_1     | InnoDB: Some operating system error numbers are described at
db_1     | InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
db_1     | 2016-10-18 13:14:06 140161674901440 [ERROR] InnoDB: Error in creating ./ibdata1: probably out of disk space
db_1     | 2016-10-18 13:14:06 140161674901440 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
db_1     | 2016-10-18 13:14:06 140161674901440 [ERROR] Plugin 'InnoDB' init function returned error.
db_1     | 2016-10-18 13:14:06 140161674901440 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
db_1     | 2016-10-18 13:14:06 140161674901440 [ERROR] Unknown/unsupported storage engine: InnoDB
db_1     | 2016-10-18 13:14:06 140161674901440 [ERROR] Aborting
</code></pre>

<p>I would really appreciate any ideas on this issue as I'm currently at the point of pulling my hair out</p>