-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
RequestRequest for image modification or featureRequest for image modification or feature
Description
Hi,
We have the need to be able to execute entrypoints on each start.
As of now the only entypoint available is executed on first start with initdb: docker-entrypoint-initdb.d
To work around this, we modify your alpine image to add another entrypoint docker-entrypoint-init.d in docker-entrypoint.sh this way:
...
_main() {
...
if [ "$1" = 'postgres' ] && ! _pg_want_help "$@"; then
...
# only run initialization on an empty data directory
if [ -z "$DATABASE_ALREADY_EXISTS" ]; then
...
docker_process_init_files /docker-entrypoint-initdb.d/*
...
else
...
fi
echo "Process custom init file "
docker_process_init_files /docker-entrypoint-init.d/*
echo "Process custom init file done "
fi
exec "$@"
}
...
Can you add such an entrypoint to the image ?
This will allow to restore db from volumes on start, make additional configurations...
Metadata
Metadata
Assignees
Labels
RequestRequest for image modification or featureRequest for image modification or feature