Mariadb-docker: controlling innodb_buffer_pool_size with environment

Created on 22 Jun 2016  路  3Comments  路  Source: MariaDB/mariadb-docker

Hi guys. I normally work with postgresql both on production and development. So i cannot see any reason why should an development database need at least 256mb to run. It would be nice if we could set this with environment variable. I'am also trying to extend your base image to append this argument but it seems that on docker-composer this can only be achieve with we provide an custom Dockerfile (which does not make sense some times).

Thanks :)

Most helpful comment

FYI, almost all mariadb variables can be passed as program arguments. No need to use a config file.
The following compose definition just works:

db1: image: mariadb:latest environment: - MYSQL_ROOT_PASSWORD=foobar command: mysqld --innodb-buffer-pool-size=256M

All 3 comments

If you don't want a short Dockerfile, your best bet is likely going to be bind-mounting a small file into /etc/mysql/conf.d/, which should be picked up by mysqld automatically (and allow you to overwrite this parameter). :+1:

FYI, almost all mariadb variables can be passed as program arguments. No need to use a config file.
The following compose definition just works:

db1: image: mariadb:latest environment: - MYSQL_ROOT_PASSWORD=foobar command: mysqld --innodb-buffer-pool-size=256M

@tianon i tried build an additional image but i was probably adding the arguments on the wrong line. @tanji solution worked.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danquah picture danquah  路  6Comments

paulz1 picture paulz1  路  8Comments

foxx picture foxx  路  4Comments

rahonalab picture rahonalab  路  5Comments

zx1986 picture zx1986  路  6Comments