-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
I want to pass multiple arguments to initdb
but looks like that's not working.
docker-compose.yml
version: '3.1'
services:
db:
build: .
restart: always
environment:
POSTGRES_PASSWORD: mypass
POSTGRES_INITDB_ARGS="--data-checksums --locale=ru_RU.UTF-8"
Dockerfile
, required to add ru_RU.UTF-8
locale to image
FROM postgres:12
RUN localedef -i ru_RU -c -f UTF-8 -A /usr/share/locale/locale.alias ru_RU.UTF-8
Error:
db_1 | initdb: unrecognized option '--data-checksums --locale=ru_RU.UTF-8'
If I set POSTGRES_INITDB_ARGS
to --data-checksums
or to --locale=ru_RU.UTF-8
it's working fine.
That seems odd because if I test corresponding line from docker-entrypoint.sh
it working fine
Code below is simply executed in bash
console
POSTGRES_INITDB_ARGS="--data-checksums --locale=ru_RU.UTF-8"
eval 'initdb --username="$POSTGRES_USER" --pwfile=<(echo "$POSTGRES_PASSWORD") '"$POSTGRES_INITDB_ARGS"
Output
The files belonging to this database system will be owned by user "hatifnatt".
This user must also own the server process.
The database cluster will be initialized with locale "ru_RU.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "russian".
Data page checksums are enabled.
...
Metadata
Metadata
Assignees
Labels
No labels