Created
July 12, 2021 12:30
-
-
Save ayrilmaz/cef6db409f74cd37c21251d525b46108 to your computer and use it in GitHub Desktop.
Build and run Postgres Docker Turkish language support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#terminal | |
sudo apt update | |
sudo apt install locale -y | |
sudo locale-gen tr_TR.UTF-8 | |
sudo update-locale | |
#dockerfile | |
FROM postgres:10 | |
RUN localedef -i tr_TR -c -f UTF-8 -A /usr/share/locale/locale.alias tr_TR.UTF-8 | |
ENV LANG tr_TR.UTF-8 | |
#terminal | |
docker build -t postgres:tr . | |
#docker-compose.yaml | |
version: '3.4' | |
volumes: | |
postgres: | |
services: | |
postgres: | |
image: postgres:tr | |
environment: | |
POSTGRES_USER: "user" | |
POSTGRES_PASSWORD: "pass" | |
PGDATA: "/data/postgres" | |
volumes: | |
- postgres:/data/postgres | |
ports: | |
- "5432:5432" | |
#sql | |
CREATE DATABASE name ENCODING='UTF-8' LC_COLLATE = 'tr_TR.UTF-8' LC_CTYPE='tr_TR.UTF-8' TEMPLATE template0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment