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/mariadb container fails to start #202

Open
AndybsCTIN opened this issue Nov 11, 2019 · 2 comments
Open

centos/mariadb container fails to start #202

AndybsCTIN opened this issue Nov 11, 2019 · 2 comments

Comments

@AndybsCTIN
Copy link

I've run the docker pull command to get the centos with mariadb image, however when I run the command to create a container from that image the container dosen't seems to work.

First the issue was related to the port 3306 being on use since I already had mysql installed and it was using that port however, after setting it to "inactive" the issue with the port being on use dismissed.

But now , I do not now the reason, when I create a container following the page example:

docker run --name=mariadb -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD= /mariadb

The container that it creates gets "Exited" Immediately , even if afterwards I run a docker start It gets Exited within 2 seconds.

@Pritij
Copy link

Pritij commented Jan 7, 2020

facing the same issue

@carylewis
Copy link

I ran the container interactively, and when I tried to run

bash -x /docker-entrypoint.sh mysqld

I got this:

+ echo 'Running mysql_install_db ...'
Running mysql_install_db ...
+ mysql_install_db --datadir=/var/lib/mysql
Neither host 'a6ab98f90d96' nor 'localhost' could be looked up with
'/usr/libexec/resolveip'
Please configure the 'hostname' command to return a correct
hostname.
If you want to solve this at a later stage, restart this script
with the --force option

I hope this helps.

I'm not sure how to add the correct hostname

Also the instructions to run the container like this:

docker run --name=mariadb -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password /mariadb55 true

doesn't make sense, because the docker-entrypoint.sh will simply exec the passed in command, which will exec true which will exit immediately?

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

3 participants