1
2
3
4
5
6
7
8
9
//src - https://stackoverflow.com/a/55593604/1320686
//copy the file outside container
docker container cp [container]:/etc/mysql/my.cnf container-my.cnf
//edit it and copy back:
docker container cp container-my.cnf [container]:/etc/mysql/my.cnf
you can use :
1
docker logs [container]
to see the exception.
origin - https://www.pipiscrew.com/?p=16515 edit-file-on-stopped-container-that-maybe-fails-to-start-smile