Skip to content

Missing locale script for postgres:15.3-alpine3.18 #1082

Closed
@belgattitude

Description

@belgattitude

I'd like to initialize locale with ICU support and alpine latest.

Not sure if it's a problem, but there's a warning about missing locale script

image

Docker compose example:

version: '3'

services:
  postgres:
    image: postgres:15.3-alpine3.18
    environment:
      POSTGRES_USER: strapi
      POSTGRES_PASSWORD: strapi
      POSTGRES_DB: strapi_test
      POSTGRES_INITDB_ARGS: '--locale-provider=icu --icu-locale=en-US --no-sync'
    restart: always
    ports:
      - '5432:5432'
    volumes:
      - pgdata_test:/var/lib/postgresql/data:rw
    healthcheck:
      test: ["CMD-SHELL", "sh -c 'pg_isready -U strapi -d strapi_test'"]
      interval: 2s
      timeout: 5s
      retries: 5
volumes:
  pgdata_test:

Full log
strapi-postgres-1  | The files belonging to this database system will be owned by user "postgres".
strapi-postgres-1  | This user must also own the server process.
strapi-postgres-1  | 
strapi-postgres-1  | The database cluster will be initialized with this locale configuration:
strapi-postgres-1  |   provider:    icu
strapi-postgres-1  |   ICU locale:  en-US
strapi-postgres-1  |   LC_COLLATE:  en_US.utf8
strapi-postgres-1  |   LC_CTYPE:    en_US.utf8
strapi-postgres-1  |   LC_MESSAGES: en_US.utf8
strapi-postgres-1  |   LC_MONETARY: en_US.utf8
strapi-postgres-1  |   LC_NUMERIC:  en_US.utf8
strapi-postgres-1  |   LC_TIME:     en_US.utf8
strapi-postgres-1  | The default database encoding has been set to "UTF8".
strapi-postgres-1  | The default text search configuration will be set to "english".
strapi-postgres-1  | 
strapi-postgres-1  | Data page checksums are disabled.
strapi-postgres-1  | 
strapi-postgres-1  | fixing permissions on existing directory /var/lib/postgresql/data ... ok
strapi-postgres-1  | creating subdirectories ... ok
strapi-postgres-1  | selecting dynamic shared memory implementation ... posix
strapi-postgres-1  | selecting default max_connections ... 100
strapi-postgres-1  | selecting default shared_buffers ... 128MB
strapi-postgres-1  | selecting default time zone ... UTC
strapi-postgres-1  | creating configuration files ... ok
strapi-postgres-1  | running bootstrap script ... ok
strapi-postgres-1  | sh: locale: not found
strapi-postgres-1  | 2023-05-14 11:03:30.936 UTC [30] WARNING:  no usable system locales were found
strapi-postgres-1  | initdb: warning: enabling "trust" authentication for local connections
strapi-postgres-1  | initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
strapi-postgres-1  | performing post-bootstrap initialization ... ok
strapi-postgres-1  | 
strapi-postgres-1  | Sync to disk skipped.
strapi-postgres-1  | The data directory might become corrupt if the operating system crashes.
strapi-postgres-1  | 
strapi-postgres-1  | 
strapi-postgres-1  | Success. You can now start the database server using:
strapi-postgres-1  | 
strapi-postgres-1  |     pg_ctl -D /var/lib/postgresql/data -l logfile start
strapi-postgres-1  | 
strapi-postgres-1  | waiting for server to start....2023-05-14 11:03:31.264 UTC [36] LOG:  starting PostgreSQL 15.3 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924, 64-bit
strapi-postgres-1  | 2023-05-14 11:03:31.265 UTC [36] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
strapi-postgres-1  | 2023-05-14 11:03:31.268 UTC [39] LOG:  database system was shut down at 2023-05-14 11:03:31 UTC
strapi-postgres-1  | 2023-05-14 11:03:31.270 UTC [36] LOG:  database system is ready to accept connections
strapi-postgres-1  |  done
strapi-postgres-1  | server started
strapi-postgres-1  | CREATE DATABASE
strapi-postgres-1  | 
strapi-postgres-1  | 
strapi-postgres-1  | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
strapi-postgres-1  | 
strapi-postgres-1  | waiting for server to shut down....2023-05-14 11:03:31.427 UTC [36] LOG:  received fast shutdown request
strapi-postgres-1  | 2023-05-14 11:03:31.428 UTC [36] LOG:  aborting any active transactions
strapi-postgres-1  | 2023-05-14 11:03:31.429 UTC [36] LOG:  background worker "logical replication launcher" (PID 42) exited with exit code 1
strapi-postgres-1  | 2023-05-14 11:03:31.429 UTC [37] LOG:  shutting down
strapi-postgres-1  | 2023-05-14 11:03:31.430 UTC [37] LOG:  checkpoint starting: shutdown immediate
strapi-postgres-1  | 2023-05-14 11:03:31.453 UTC [37] LOG:  checkpoint complete: wrote 918 buffers (5.6%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.010 s, sync=0.012 s, total=0.025 s; sync files=250, longest=0.001 s, average=0.001 s; distance=4222 kB, estimate=4222 kB
strapi-postgres-1  | 2023-05-14 11:03:31.458 UTC [36] LOG:  database system is shut down
strapi-postgres-1  |  done
strapi-postgres-1  | server stopped
strapi-postgres-1  | 
strapi-postgres-1  | PostgreSQL init process complete; ready for start up.
strapi-postgres-1  | 
strapi-postgres-1  | 2023-05-14 11:03:31.583 UTC [1] LOG:  starting PostgreSQL 15.3 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924, 64-bit
strapi-postgres-1  | 2023-05-14 11:03:31.583 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
strapi-postgres-1  | 2023-05-14 11:03:31.583 UTC [1] LOG:  listening on IPv6 address "::", port 5432
strapi-postgres-1  | 2023-05-14 11:03:31.585 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
strapi-postgres-1  | 2023-05-14 11:03:31.589 UTC [52] LOG:  database system was shut down at 2023-05-14 11:03:31 UTC
strapi-postgres-1  | 2023-05-14 11:03:31.592 UTC [1] LOG:  database system is ready to accept connections
strapi-postgres-1  | 2023-05-14 11:08:31.686 UTC [50] LOG:  checkpoint starting: time
strapi-postgres-1  | 2023-05-14 11:08:35.862 UTC [50] LOG:  checkpoint complete: wrote 44 buffers (0.3%); 0 WAL file(s) added, 0 removed, 0 recycled; write=4.119 s, sync=0.027 s, total=4.177 s; sync files=12, longest=0.024 s, average=0.003 s; distance=252 kB, estimate=252 kB

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