public inbox for [email protected]  
help / color / mirror / Atom feed
Running psql in a docker container
2+ messages / 2 participants
[nested] [flat]

* Running psql in a docker container
@ 2024-07-11 14:57  H <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: H @ 2024-07-11 14:57 UTC (permalink / raw)
  To: PostgreSQL Users Mailing List <[email protected]>

I used to successfully run psql server 13 in a CentOS 7 docker container with CentOS 7 as the host operating system. I have now upgraded that system to Rocky Linux 9 as the host operating system and modifying my container to also use Rocky Linux 9 and psql server 16.

I can successfully get the container up and running and can connect to it. However, I have not managed to modify the initdb statement to use en_US.UTF-8 for all databases.

In the old container I used:

su - postgres -c "/usr/pgsql-13/bin/initdb -D /var/lib/pgsql/13/data/ -E 'UTF-8' --lc-collate='en_US.UTF-8' --lc-ctype='en_US.UTF-8'"

but this does not work with psql 16. I tried:

su - postgres -c "/usr/pgsql-16/bin/initdb -D /var/lib/pgsql/16/data/ -E 'UTF-8' --lc-lang='en_US'"

and variations thereof with no success.

Any suggestions on what I have missed?

Thank you.






^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Running psql in a docker container
@ 2024-07-11 15:06  Adrian Klaver <[email protected]>
  parent: H <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Adrian Klaver @ 2024-07-11 15:06 UTC (permalink / raw)
  To: H <[email protected]>; PostgreSQL Users Mailing List <[email protected]>

On 7/11/24 07:57, H wrote:
> I used to successfully run psql server 13 in a CentOS 7 docker container with CentOS 7 as the host operating system. I have now upgraded that system to Rocky Linux 9 as the host operating system and modifying my container to also use Rocky Linux 9 and psql server 16.
> 
> I can successfully get the container up and running and can connect to it. However, I have not managed to modify the initdb statement to use en_US.UTF-8 for all databases.
> 
> In the old container I used:
> 
> su - postgres -c "/usr/pgsql-13/bin/initdb -D /var/lib/pgsql/13/data/ -E 'UTF-8' --lc-collate='en_US.UTF-8' --lc-ctype='en_US.UTF-8'"
> 
> but this does not work with psql 16. I tried:
> 
> su - postgres -c "/usr/pgsql-16/bin/initdb -D /var/lib/pgsql/16/data/ -E 'UTF-8' --lc-lang='en_US'"
> 
> and variations thereof with no success.

Without a definition of what '... no success' means there is no real way 
to answer this.

> 
> Any suggestions on what I have missed?
> 
> Thank you.
> 
> 

-- 
Adrian Klaver
[email protected]







^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-07-11 15:06 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-07-11 14:57 Running psql in a docker container H <[email protected]>
2024-07-11 15:06 ` Adrian Klaver <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox