built image errors out during mysql start
sbma44 opened this issue · comments
The j1cs/alpine-lamp
image works great. But building from the Dockerfile results in an image that errors out & exits after logging two process launches:
2019-09-07 20:50:55 0 [Note] /usr/bin/mysqld (mysqld 10.3.17-MariaDB-log) starting as process 49 ...
2019-09-07 20:50:56 0 [Note] /usr/bin/mysqld (mysqld 10.3.17-MariaDB-log) starting as process 1 ...
(the working image shows five processes and does not exit)
I'm not blocked -- I can just use the working image as a base for what I need (turning AllowOverride
on) but curious if this is something you see. Might be worth pinning some package versions.
(thanks for your work on this project!)
Hi! thank you for using this project!
This log happens because theres two intruccions at the end that entry.sh
executes:
/usr/bin/mysqld --user=root --bootstrap --verbose=0 < $tfile
rm -f $tfile
exec /usr/bin/mysqld --user=root --bind-address=0.0.0.0
The first one load multiples queries for the root user and the second one start the binary mysqld
. Thats why you see two outputs.
It seems that the number at the end of the log is the number of taks executed. I think thats happens when mysql before starting as a daemon run various other tasks and when shows 1 is because its start as a daemon.
Im not sure about the last part but im sure about that the two output its part of this two intruccions at the end of the file entry.sh
.
Thanks j1cs. I'm not sure this is it, though--when things work property, five or six processes spawn. I think that's just mysqld doing its normal thing, standing by to respond to queries in parallel. I don't think it's a product of the multiple invocations.
The issue is that when built from the Dockerfile the mysqld
invocation exits and so the container stops. That doesn't happen with the image in docker hub.
Can you try a docker build . -t whatever
and then try running it with mkdir -p $(pwd)/mysql-data && docker run -d -v $(pwd):/var/www/localhost/htdocs/ -v $(pwd)/mysql-data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=password -p 80:80 -p 3306:3306 --name lamp whatever
? I think you'll see what I mean
Oh i see. When you provide a volume for /var/lib/mysql
the container terminated (building locally).
I misread the previous comment.
I will see what can i do
@sbma44 I reviewed and I decided to take mysql_install_db --user=mysql --verbose=1 --basedir=/usr --datadir=/var/lib/mysql --rpm > /dev/null
from Dockerfile
and put it in entry.sh
. When you provide a folder as a volume for some reason mariadb doesn't load every file and folder to run well. For that reason I changed the instruction from file to file.
Let me know if now works to release another stable version. Here the commit a68742e, but you can grab master to test it.
@sbma44 any news? i'm gonna close the issue.