File tree Expand file tree Collapse file tree 3 files changed +16
-14
lines changed
Expand file tree Collapse file tree 3 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 11FROM postgres:10
22
3- RUN localedef -i cs_CZ -c -f UTF-8 -A /usr/share/locale/locale.alias cs_CZ.UTF-8
43ENV LANG cs_CZ.utf8
54
6- COPY ./czech_unaccent.tar.gz /root
7- RUN cd /root && tar xvzf czech_unaccent.tar.gz && \
8- cp fulltext_dicts/* $(find / -iname "tsearch_data" ) && \
9- rm -rf fulltext_dicts czech.tar.gz
10-
5+ COPY ./ext/unaccent/czech_unaccent.tar.gz /tmp
116COPY ./init-scripts/* /docker-entrypoint-initdb.d/
7+
8+ RUN localedef -i cs_CZ -c -f UTF-8 -A /usr/share/locale/locale.alias cs_CZ.UTF-8 && \
9+ cd /tmp && tar xvzf czech_unaccent.tar.gz && \
10+ cp fulltext_dicts/* /usr/share/postgresql/10/tsearch_data && \
11+ rm -rf /tmp/*
Original file line number Diff line number Diff line change 11# Postgres
22
3- Postgres with configured unaccent for Czech language
3+ Tuned PostgreSQL docker image.
4+
5+ - configured unaccent for Czech language
46
57-----
68
@@ -14,16 +16,16 @@ Postgres with configured unaccent for Czech language
1416## Usage
1517
1618``` sh
17- docker build -t dockette-postgres .
19+ docker run --rm -it -p 5432:5432 dockette/postgres
20+ ```
1821
19- docker run --rm -it -p 5432:5432 --name dockette-postgres dockette-postgres
22+ ## Test
2023
24+ ``` sql
25+ SELECT unaccent(' Hôtel' ); // Hotel
26+ SELECT unaccent(' Žluťoučký kůň' ); // Zlutoucky kun
2127```
2228
2329## Credits
2430
25- Thanks Ondrej Musil for: https://github.com/freaz/docker-postgres-czech-unaccent
26-
27- ## Tip
28-
29- Without any docker volumes configured Postgres data will be lost after container stops.
31+ > Based on Ondrej Musil https://github.com/freaz/docker-postgres-czech-unaccent . Thank you.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments