bitnami / containers

Bitnami container images
https://bitnami.com
Other
3.31k stars 4.79k forks source link

MARIADB_RANDOM_ROOT_PASSWORD Not Working #68053

Closed malcalevak closed 2 months ago

malcalevak commented 3 months ago

Name and Version

bitnami/mariadb:latest

What architecture are you using?

None

What steps will reproduce the bug?

Adding the environment variable MARIADB_RANDOM_ROOT_PASSWORD set to anything

What is the expected behavior?

The container runs, and a random root password is created and output in the container logs, e.g.:

2024-06-24 17:46:16 2024-06-24 21:46:16+00:00 [Note] [Entrypoint]: GENERATED ROOT PASSWORD: `[A_beL5!?IY?3GnHV|H5.^VX#mM7$Ir

What do you see instead?

2024-06-24 17:50:05 mariadb 21:50:05.49 ERROR ==> The MARIADB_ROOT_PASSWORD environment variable is empty or not set. Set the environment variable ALLOW_EMPTY_PASSWORD=yes to allow the container to be started with blank passwords. This is recommended only for development.

Additional information

The official mariadb image works as expected.

carrodher commented 3 months ago

Please note this env. variable is not available, see https://github.com/bitnami/containers/tree/main/bitnami/mariadb#environment-variables. By default, a random password is generated if you don't specify anything else

malcalevak commented 3 months ago

Please note this env. variable is not available, see https://github.com/bitnami/containers/tree/main/bitnami/mariadb#environment-variables. By default, a random password is generated if you don't specify anything else

Thanks for pointing me to that, I'm not sure how I missed it. That said, you seem to be mistaken (or I'm misunderstanding), if no password is specified, a random password is not generated, or at least, the container fails to run and says"The MARIADB_ROOT_PASSWORD environment variable is empty or not set. Set the environment variable ALLOW_EMPTY_PASSWORD=yes to allow the container to be started with blank passwords. This is recommended only for development."

carrodher commented 3 months ago

Yes, you're right, the logic to generate a random password is implemented in the Helm chart itself but not in the container.

If you're interested in contributing a solution at container level, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.

github-actions[bot] commented 2 months ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] commented 2 months ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.