Skip to content

Commit 750a851

Browse files
committed
Added Postgres 12,13
1 parent a6bd084 commit 750a851

File tree

17 files changed

+305303
-34
lines changed

17 files changed

+305303
-34
lines changed

10/Dockerfile

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

3-
ENV LANG cs_CZ.utf8
3+
ENV LC_ALL=cs_CZ.UTF-8
4+
ENV LANG=cs_CZ.UTF-8
5+
ENV LANGUAGE=cs_CZ.UTF-8
6+
ENV TZ=Europe/Prague
7+
ENV POSTGRES_VERSION=10
48

5-
COPY ./ext/unaccent/czech_unaccent.tar.gz /tmp
6-
COPY ./init-scripts/* /docker-entrypoint-initdb.d/
9+
COPY ./shared/misc/czech /usr/share/postgresql/${POSTGRES_VERSION}/tsearch_data
10+
COPY ./shared/init-scripts/* /docker-entrypoint-initdb.d/
711

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/*
12+
RUN localedef -i cs_CZ -c -f UTF-8 -A /usr/share/locale/locale.alias cs_CZ.UTF-8
-919 KB
Binary file not shown.

10/init-scripts/init-czech-dict.sql

Lines changed: 0 additions & 6 deletions
This file was deleted.

11/Dockerfile

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

3-
ENV LANG cs_CZ.utf8
3+
ENV LC_ALL=cs_CZ.UTF-8
4+
ENV LANG=cs_CZ.UTF-8
5+
ENV LANGUAGE=cs_CZ.UTF-8
6+
ENV TZ=Europe/Prague
7+
ENV POSTGRES_VERSION=11
48

5-
COPY ./ext/unaccent/czech_unaccent.tar.gz /tmp
6-
COPY ./init-scripts/* /docker-entrypoint-initdb.d/
9+
COPY ./shared/misc/czech /usr/share/postgresql/${POSTGRES_VERSION}/tsearch_data
10+
COPY ./shared/init-scripts/* /docker-entrypoint-initdb.d/
711

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/11/tsearch_data && \
11-
rm -rf /tmp/*
12+
RUN localedef -i cs_CZ -c -f UTF-8 -A /usr/share/locale/locale.alias cs_CZ.UTF-8
-919 KB
Binary file not shown.

11/init-scripts/init-czech-dict.sql

Lines changed: 0 additions & 6 deletions
This file was deleted.

12/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM postgres:12
2+
3+
ENV LC_ALL=cs_CZ.UTF-8
4+
ENV LANG=cs_CZ.UTF-8
5+
ENV LANGUAGE=cs_CZ.UTF-8
6+
ENV TZ=Europe/Prague
7+
ENV POSTGRES_VERSION=12
8+
9+
COPY ./shared/misc/czech /usr/share/postgresql/${POSTGRES_VERSION}/tsearch_data
10+
COPY ./shared/init-scripts/* /docker-entrypoint-initdb.d/
11+
12+
RUN localedef -i cs_CZ -c -f UTF-8 -A /usr/share/locale/locale.alias cs_CZ.UTF-8

13/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM postgres:13
2+
3+
ENV LC_ALL=cs_CZ.UTF-8
4+
ENV LANG=cs_CZ.UTF-8
5+
ENV LANGUAGE=cs_CZ.UTF-8
6+
ENV TZ=Europe/Prague
7+
ENV POSTGRES_VERSION=13
8+
9+
COPY ./shared/misc/czech /usr/share/postgresql/${POSTGRES_VERSION}/tsearch_data
10+
COPY ./shared/init-scripts/* /docker-entrypoint-initdb.d/
11+
12+
RUN localedef -i cs_CZ -c -f UTF-8 -A /usr/share/locale/locale.alias cs_CZ.UTF-8

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
build-10: _build-10
2+
build-11: _build-11
3+
build-12: _build-12
4+
build-13: _build-13
5+
6+
_build-%: BUILD_VERSION=$*
7+
_build-%:
8+
docker build \
9+
-t dockette/postgres:${BUILD_VERSION} \
10+
-f ${BUILD_VERSION}/Dockerfile \
11+
.

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Postgres
22

3-
Tuned PostgreSQL 10/11 docker image.
4-
5-
- configured unaccent for Czech language
3+
Tuned PostgreSQL 10/11/12/13 docker image.
64

5+
- extensions unaccent, intarray
6+
- configured czech language
7+
-
78
-----
89

910
[![Docker Stars](https://img.shields.io/docker/stars/dockette/postgres.svg?style=flat)](https://hub.docker.com/r/dockette/postgres/)
@@ -15,26 +16,33 @@ Tuned PostgreSQL 10/11 docker image.
1516

1617
## Versions
1718

18-
- PostgreSQL 10/11
19+
- PostgreSQL 10/11/12/13
1920

2021
## Usage
2122

2223
```sh
23-
docker run --rm -it -p 5432:5432 dockette/postgres:10
24+
docker run --rm -it -p 5432:5432 dockette/postgres:13
25+
docker run --rm -it -p 5432:5432 dockette/postgres:12
2426
docker run --rm -it -p 5432:5432 dockette/postgres:11
27+
docker run --rm -it -p 5432:5432 dockette/postgres:10
2528
```
2629

2730
## Test
2831

2932
```sql
33+
SELECT to_tsvector('czech'::regconfig, 'test');
3034
SELECT unaccent('Hôtel'); // Hotel
3135
SELECT unaccent('Žluťoučký kůň'); // Zlutoucky kun
3236
```
3337

34-
## Credits
38+
## Resources
3539

36-
> Based on Ondrej Musil https://github.com/freaz/docker-postgres-czech-unaccent. Thank you.
40+
Thank you for inspiration.
3741

38-
## Resources
42+
- https://github.com/char0n/postgresql-czech-fulltext
43+
- https://github.com/tjelen/postgres-tsearch-czech
44+
- https://github.com/freaz/docker-postgres-czech-unaccent
45+
46+
Other resources.
3947

4048
- https://postgres.cz/wiki/Instalace_PostgreSQL#Instalace_Fulltextu

0 commit comments

Comments
 (0)