Setup binlogs from Docker compose file ?

Hi, I need to setup binlogs from Docker compose file, is it possible ? I tried to add it to the command property like this:

services: our-database: image: mariadb:10.7.8 command: --log-bin --log-basename='/data/mariadb/binlogs'

When a start the docker image and connect to my MariaDb and execute the sql below to check the status of binlogs, it's OFF

show variables like '%log_bin%';

Answer Answered by Daniel Black in this comment.

The log-basename cannot contain a path, it must just be the prefix. Check the logs it might be failing.

note 10.7 is end of life now.

Note if you are doing replication https://github.com/MariaDB/mariadb-docker/pull/503 was added recently and will hopefully make it to the official images in the next 24 hrs - https://github.com/docker-library/official-images/pull/14625.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.