[MDEV-24984] Docker images do not understand MARIADB_* parameters Created: 2021-02-25  Updated: 2021-03-01  Resolved: 2021-03-01

Status: Closed
Project: MariaDB Server
Component/s: Docker
Affects Version/s: None
Fix Version/s: 10.2.38, 10.3.29, 10.4.19, 10.5.10

Type: Bug Priority: Major
Reporter: Timofey Turenko Assignee: Daniel Black
Resolution: Fixed Votes: 0
Labels: None


 Description   

Everything is ok of MYSQL_* parameters are in use (e.g. https://mdbe-buildbot.mariadb.net/#/builders/171/builds/62/steps/4/logs/stdio)

Failed test:

https://mdbe-buildbot.mariadb.net/#/builders/171/builds/57/steps/4/logs/stdio

RUN: docker run --name mariadbtest-57 -e MARIADB_USER=testuser -e MARIADB_PASSWORD=7sFh5+mOpHqwuAiCgiF/GmUnj4RkQWexwl6+Re44PaU= -e MARIADB_RANDOM_ROOT_PASSWORD=Y -d mariadb:10.5
ff77c82459d2b498715ac4edce06e92a5c31d3b7fefba3ede3ef437c71215ee5
RUN: docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mariadbtest-57
172.17.0.2
RUN: echo 'select version()' | mysql -utestuser -p'7sFh5+mOpHqwuAiCgiF/GmUnj4RkQWexwl6+Re44PaU=' -h 172.17.0.2
ERROR 2002 (HY000): Can't connect to MySQL server on '172.17.0.2' (115)
ERROR: 
RUN: docker logs ff77c82459d2b498715ac4edce06e92a5c31d3b7fefba3ede3ef437c71215ee5
2021-02-25 13:12:08+00:00 [ERROR] [Entrypoint]: Database is uninitialized and password option is not specified
	You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD
2021-02-25 13:12:08+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.9+maria~focal started.
2021-02-25 13:12:08+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2021-02-25 13:12:08+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.9+maria~focal started.



 Comments   
Comment by Daniel Black [ 2021-02-25 ]

I have a solution waiting - https://github.com/MariaDB/mariadb-docker/pull/333

I'm just waiting on write access the repository.

Comment by Daniel Black [ 2021-03-01 ]

Merged the 333 pull request https://github.com/MariaDB/mariadb-docker/pull/333/commits/693a6853e65353a0e31934a4ad1a77a147c3066d

https://github.com/MariaDB/mariadb-docker/commit/bc46d053a9080ea8cdbf0cb766b1cc59f0d505f0 for consistency of names MARIADB_ALLOW_EMPTY_ROOT_PASSWORD

Docs updated ready for submission. Advertising the functionally on those versions not released might confuse people so I'll submit for merge closer to release.

Generated at Thu Feb 08 09:34:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.