Skip to content

postgres v13.11 initdb: error: invalid locale settings; check LANG and LC_* environment variables #1112

@gaslitbytech

Description

@gaslitbytech

Currently getting the following errors as of today.

initdb: error: invalid locale settings; check LANG and LC_* environment variables

I've stumbled on 2 potential solutions that seems to fix it:

  1. be explicit and use 13.11-bullseye tag instead of just 13.11. Or

  2. to add the following locale sttings to our Dockerfile with 13.11-bookworm

RUN echo en_US.UTF-8 UTF-8 > /etc/locale.gen
RUN locale-gen en_US.UTF-8

I just don't get why we would need to do this now as all 13.11, 13.11-bullseye and 13.11-bookworm was last pushed 19 days ago. And would find it hard to justify either of these workarounds.

This is on both on my Ubuntu workstation and CI that are both using docker 24.0.4 and buildx v0.11.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions