Initdb args for bitnami postgresql docker images

Looking at the PostgreSQL Kubernetes Helm chart, that is using the bitnami docker images, I can’t figure out how to add initdb args, actually I can not find at all how initdb is ever being invoked, as I can only find the ability to add user scripts to /docker-entrypoint-initdb.d/ but surely these are only being applied after initdb time (and only once) ?

For the official PostgreSQL docker images, you can use the env var: POSTGRES_INITDB_ARGS, e.g

-e POSTGRES_INITDB_ARGS “–lc-collate=da_DK.utf8 --locale=da_DK.utf8 --lc-ctype=da_DK.utf8”

Please enlighten me on how to do this with the bitnami images ?

I found that initdb is called like this from the nami helpers.js

          `-E UTF8 -D ${$app.dataDir} -U "postgres"`,
            cwd: $app.installdir, detachStdStreams: true, runAs: user, env: {LC_ALL: 'C'},

So it seems to me there is no way to affect how its called

Hi @svinther,

Thank you for your interest in our PostgreSQL solution. Our team is investigating your request and will update this thread as soon as possible.


Hello @svinther,

You are right! Right now, there isn’t any environment variable exposed to specify args for the initdb command.

However, it looks like something we need to support so we will work on include this feature in the Bitnami PostgreSQL container.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.