sclorg/mysql-container

centos/mysql-57-centos7:latest - CentOS Root access?

Pasayadaan opened this issue · 1 comments

Using Centos/mysql-57-centos7 how can we get root access for centos to install additional components such as Percona Xtrabackup or to execute shell script.

It throws error "Permission denied"

You can either run the container as root:

docker -u 0 <other args> centos/mysql-57-centos7

but that might not work easily, because mysqld process rejects to run as root from security reasons.

So, I'd rather advice to build your own image using this Dockerfile and docker build .:

FROM centos/mysql-57-centos7
USER 0
RUN yum -y install ... && yum clean all
USER 27