title: MariaDB configs not used by docker container
body: <p>I want to customize some MariaDB server configs (wait_timeout, etc.). I followed the <a href="https://hub.docker.com/_/mariadb" rel="nofollow noreferrer">instructions on the official Docker image</a> and created two <code>.cnf</code> files inside my host dir <code>config/mariadb</code> which is mounted in the container via these volumes:</p>
  <pre><code>volumes:
    - /config/mariadb:/etc/mysql/conf.d:ro
    - /config/mariadb:/etc/mysql/mariadb.conf.d:ro
  </code></pre>
  <pre><code>root@server:~# ls -l /config/mariadb
  total 12
  -rwxrwx--- 1 root root 263 Jun  8 13:43 mariadb-finetuning.cnf
  -rwxrwx--- 1 root root 367 Jun  8 13:43 mariadb-inno.cnf
  </code></pre>
  <p>These are the config files:</p>
  <pre><code>[mysqld]
  # * InnoDB
  #
  # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
  # Read the manual for more InnoDB related options. There are many!
  # default_storage_engine    = InnoDB
  # innodb_buffer_pool_size   = 256M
  # innodb_log_buffer_size    = 8M
  # innodb_file_per_table = 1
  # innodb_open_files = 400
  # innodb_io_capacity    = 400
  innodb_flush_method = fsync
  </code></pre>
  <pre><code>[mysqld]
  # * Fine Tuning
  #
  # max_connections       = 100
  # connect_timeout       = 5
  wait_timeout        = 3600
  # max_allowed_packet    = 16M
  # thread_cache_size       = 128
  # sort_buffer_size  = 4M
  # bulk_insert_buffer_size   = 16M
  # tmp_table_size        = 32M
  # max_heap_table_size   = 32M
  </code></pre>
  <p>Somehow the options have no effect and I don't know why:</p>
  <pre class="lang-sql prettyprint-override"><code>show variables where variable_name = 'innodb_flush_method'
  
  # Variable_name Value
  # innodb_flush_method   O_DIRECT
  </code></pre>
  <p>Is there any better way to check why mariadb does not pick up these configs?</p>
  <p>Update:</p>
  <ul>
  <li>Manually editing <code>my.cnf</code> inside the container works but isn't what I want to do.</li>
  <li>Runnnig <code>mysqld --print-defaults</code> will print out <code>... --innodb_flush_method=fsync</code> as result. It seems to me that this may be due to the entrypoint script <code>/docker-entrypoint.sh</code> ?</li>
  </ul>