Linux/Docker

dockerfile로 postgresql에 한글 설정(커스터마이징) 하는 방법

holhol-e 2025. 2. 20. 17:41

#> vi Dockerfile

FROM postgres:17.3

RUN apt-get update && apt-get install -y locales openssh-client

RUN locale-gen ko_KR.UTF-8

RUN localedef -i ko_KR -f UTF-8 ko_KR.UTF-8

ENV LANG=ko_KR.utf8 \
    LC_COLATE=ko_KR.utf8 \
    POSTGRES_INITDB_ARGS=--data-checksums

 

#> docker build -t postgres-ko:17.3 .

#> docker image ls

REPOSITORY    TAG       IMAGE ID       CREATED             SIZE
postgres-ko   17.3      ce0b637e601d   About an hour ago   477MB
postgres      latest    d14b06b9a915   3 days ago          438MB