Skip to content

Commit dbfbe49

Browse files
committed
Improvements
1 parent e49fe39 commit dbfbe49

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
FROM postgres:10
22

3-
RUN localedef -i cs_CZ -c -f UTF-8 -A /usr/share/locale/locale.alias cs_CZ.UTF-8
43
ENV 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
116
COPY ./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/*

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
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.

0 commit comments

Comments
 (0)