I have been using a self-built mariaDB container in a stack for many years. Now I have set up a new machine based on Debian and found that the container is not running.
The cause is simply that /var/lib/mysql/mysql.sock cannot be found within the container. Various authors have searched for this error several times, but there is no convincing solution anywhere.
It is the same image that also runs perfectly under Ubuntu and has run for years under coreOS 8. How can the creation of the /var/lib/mysql/mysql.sock depend on the underlying operating system?
Incidentally, I have occasionally noticed the same misbehavior under Ubuntu, but have not been able to clarify it further. So the error does not seem to depend on the underlying operating system.
And this is also in line with expectations. Docker containers are supposed to run identically and flawlessly in every environment, which is one of the advantages of containerization.
As far as I know, the socket is created automatically when the server is started in the container. However, this seems to fail under certain circumstances. I have made sure that there is enough space both in RAM and on the hard disk. Incidentally, mysql.sock hardly takes up any space.
How can I understand this error?
What are the circumstances and how can the error be corrected?