On some systems (for example ArchLinux) there is by default a large open file limit configured. MySQL 5.7 has a bug that triggers it to allocate a lot of RAM at startup (more than 16 GB!). This bug was fixed in later versions of MySQL. As a workaround the problem can be avoided by adding small ulimits in the docker-compose file which I have done in this commit.
On some systems (for example ArchLinux) there is by default a large open file limit configured. MySQL 5.7 has a bug that triggers it to allocate a lot of RAM at startup (more than 16 GB!). This bug was fixed in later versions of MySQL. As a workaround the problem can be avoided by adding small ulimits in the docker-compose file which I have done in this commit.
For more information see here: https://bugs.mysql.com/bug.php?id=96525 and https://github.com/docker-library/mysql/issues/579.