Search code examples
dockerdocker-for-windowskitematicdocker-desktop

Can't set custom configuration file for mysql docker container


I am using the Mysql image (https://hub.docker.com/r/library/mysql/). I want to use a custom conf file to override the sql mode but I am having some difficulties.

enter image description here

When I click on the first line, where the change button is, it displays like there is no file in that folder but there is a my.cnf file there.

Do I need to make additional changes somewhere?

To run/start the container I used this command docker run --name some-mysql -v /my/custom:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag but with my data.

Thanks!


Solution

  • It was a problem with the permissions on the conf file.