Closed typoworx-de closed 2 years ago
set -e
and you'll see it is failing at the source /docker-entrypoint.sh
line
source /usr/local/bin/docker-entrypoint.sh
or source "$(command -v docker-entrypoint.sh)"
:
https://github.com/MariaDB/mariadb-docker/blob/766eea4c9c10f5915278d04f30147031567b1fd8/10.8/Dockerfile#L135entrypoint
likely resets command
too, so you need to also supply that for "$@"
to work as expected_main
is probably not going to do what you want as it ends in basically exec mysqld
and so will never return to your script to run anything else.
The location of the entrypoint script isn't what you expected.
$ podman run --rm -ti mariadb:10.6 find . -name docker-entrypoint.sh
./usr/local/bin/docker-entrypoint.sh
I'm trying to override docker-entrypoint.sh to implement a feature being able to import sql-patches (not initdb).
my script looks like this and I'm overriding entrypoint in my docker-compose.yml
docker-compose.overrides.yml
/root/bin/custom-entrypoint.sh (inside container)
Restarting the stack results in the following error in the new entrypoint:
It looks like the source'ing is somehow ignored for my own entrypoint script.
Is there any draft how to properly do this? I think the last line in the original-entrypoint in this project already proposes a draft on how to use it, but for some reason the functions of this script are not sourced/imported in the custom entrypoint :-/