Docker Community Forums

Share and learn in the Docker community.

Mariadb my.cnf via docker-compose

Anyone know how to pass the custom ‘my.cnf’ file to the /etc/mysql/conf.d in the docker build. In native docker build, it can be passed via ‘-v’ switch but how can it be created via a docker-compose yaml file. Any documentation available to download the file via git or via some other mechanism?

Installing and Using MariaDB via Docker
Installing Docker on Your System with the Universal Installation Script. Starting dockerd.
Using MariaDB Images. Downloading an Image. Creating a Container. Running and Stopping the Container. Pausing Containers. …
Installing MariaDB on Another Image. Daemonizing the Operating System. Installing MariaDB.
See Also.