I used the following command to copy my.cnf to the local system:
docker container cp [container]:/etc/mysql/my.cnf container-my.cnf
then added innodb-force-recovery=1 to the file container-my.cnf using nano and then copied the file back to the docker using this command:
docker container cp container-my.cnf [container]:/etc/mysql/my.cnf
After restarting the docker it seemed to do something for a little and then stopped again. Started the mysql docker and then it was back to crashing again. Removed the line out of the my.cnf file that i added above using the same steps. The mysql docker started and then did some stuff for a while and is up and running again.