Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Pasayadaan opened this issue Dec 4, 2020 · 1 comment
Open

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

Pasayadaan opened this issue Dec 4, 2020 · 1 comment

Comments

@Pasayadaan
Copy link

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"

@hhorak
Copy link
Member

hhorak commented Feb 22, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants