Skip to content

Missing locale #415

@xarg

Description

@xarg

Seems like the latest 10.2 image (maybe earlier?) does not have the locale set correctly:

pg0_1        | 2018-02-16 17:08:35.744 UTC [1] LOG:  invalid value for parameter "lc_messages": "en_US.utf8"                                                                                                                           
pg0_1        | 2018-02-16 17:08:35.744 UTC [1] LOG:  invalid value for parameter "lc_monetary": "en_US.utf8"                                                                                                                           
pg0_1        | 2018-02-16 17:08:35.745 UTC [1] LOG:  invalid value for parameter "lc_numeric": "en_US.utf8"        
pg0_1        | 2018-02-16 17:08:35.745 UTC [1] LOG:  invalid value for parameter "lc_time": "en_US.utf8"           
pg0_1        | 2018-02-16 17:08:35.745 UTC [1] FATAL:  configuration file "/var/lib/postgresql/data/10/postgresql.conf" contains errors         

When I run locale commands in the container:

# locale                                                                                                 
locale: Cannot set LC_CTYPE to default locale: No such file or directory                                           
locale: Cannot set LC_MESSAGES to default locale: No such file or directory                                        
locale: Cannot set LC_ALL to default locale: No such file or directory                                             
LANG=en_US.utf8                                          
LANGUAGE=                                                
LC_CTYPE="en_US.utf8"                                    
LC_NUMERIC="en_US.utf8"     
LC_TIME="en_US.utf8"        
LC_COLLATE="en_US.utf8"                                                                                            
LC_MONETARY="en_US.utf8"                                                                                           
LC_MESSAGES="en_US.utf8"                                 
LC_PAPER="en_US.utf8"                                    
LC_NAME="en_US.utf8"                                     
LC_ADDRESS="en_US.utf8"                                  
LC_TELEPHONE="en_US.utf8"                                
LC_MEASUREMENT="en_US.utf8"                              
LC_IDENTIFICATION="en_US.utf8"                           
LC_ALL= 

To fix it I did this:
RUN localedef -i en_US -f UTF-8 en_US.UTF-8

Hope it helps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsability question, not directly related to an error with the image

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions