tudom nem ez volt a kérdés, de miért nem indítasz két konténert? egy hivatalos mariadb-t, és a saját php+apache konténeredet?