MariaDB / mariadb-docker

Docker Official Image packaging for MariaDB
https://mariadb.org
GNU General Public License v2.0
770 stars 438 forks source link

[buildah/podman] MYSQL_* environment variables not working as expected #364

Closed o-alquimista closed 3 years ago

o-alquimista commented 3 years ago

I'm using Buildah to build an image based on this one, and Podman to run it. Environment variables, such as MYSQL_ROOT_PASSWORD, are not working as expected. The root user in mariadb is not assigned with the chosen password. Instead, it remains without a password, allowing me to login by simply running mysql -u root.

This is how I define the env. variable:

workingcontainer=$(buildah from docker.io/library/mariadb:10.5)

buildah config --env MYSQL_ROOT_PASSWORD="example_password" $workingcontainer

# other tasks...
# unmount and commit new image

Then I run the local image I just created. It is actually set inside the container. I confirmed that with echo $MYSQL_ROOT_PASSWORD on the running mariadb container.

My guess is that there is something wrong with the entrypoint scripts that perform the initial setup. But then the same setup works as expected when I use Docker instead of Podman/Buildah.

Things I've tried:

o-alquimista commented 3 years ago

Closing as not a bug. The problem originates from something else in my build setup, as I was unable to reproduce this issue with a simpler test case.

grooverdan commented 3 years ago

Oh good. I was starting to look and assume that the entrypoint was overwritten. I'll look at your other issue soon.