Open Alex1s opened 2 months ago
So it seems that the docker-entrypoint.sh
properly passes the arguments, to mariadb-install-db
(source code here). But mariadb-install-db
does some processing of the arguments which expands the argument with whitespace to multiple arguments before passing them to mariadbd
(see here).
As mariadb-install-db
is written in sh
I don't know how to prevent the whitespace argument from expanding without changing to bash
or something else ...
Another option would be to not pass the --init-connect
argument to mariadb-install-db
in the docker-entrypoint.sh
.
Yep, you got it right. The only real POSIX array is '$@' that can be manipulated with set -- $newargs
ref. Looking again, this might be fixable upstream.
I'm still considering your workaround.
Use this
docker-compose.yaml
and make sure the
database
volume is empty while thesql-backup-load-vol
volume contains abackup.sql.xz
file.Then following error will be produced:
When the database is already init, this error does not occur. I think it is a problem with the entrypoint script, at the point where it tries to init the database and properly handling the whitespace of the
init-connect
argument.