Running mysql in the foreground in centos

centos, docker, mysql

Solution

If you run `mysqld_safe`

CMD ["mysqld_safe"]

The process should be in the foreground and blocking.

However as the comments above suggest, there are several official supported MySQL containers which you should consider using.

Problem

I am building a docker image for a mysql database. For that purpose, I have to run mysql in the foreground and not as a deamon service. I am using a centos base image. How to run mysql in the foreground?

Original source