forked from zdk/pg-search-thai
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.bitnami
21 lines (18 loc) · 1.06 KB
/
Dockerfile.bitnami
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM bitnami/postgresql:14 as builder
USER root
WORKDIR /build
COPY . .
RUN apt update -y && apt install -y git libthai-dev libc6-dev build-essential && \
cd /build && \
make all
FROM bitnami/postgresql:14
COPY --from=builder /build/thai_parser/thai_parser.so /opt/bitnami/postgresql/lib/
COPY --from=builder /build/thai_parser/thai_parser.control /opt/bitnami/postgresql/share/extension/
COPY --from=builder /build/thai_parser/sql/thai_parser--1.0.sql /opt/bitnami/postgresql/share/extension/
COPY --from=builder /build/thai_parser/sql/thai_parser--unpackaged--1.0.sql /opt/bitnami/postgresql/share/extension/
COPY --from=builder /usr/lib/x86_64-linux-gnu/libthai.* /usr/lib/x86_64-linux-gnu/
COPY --from=builder /usr/lib/x86_64-linux-gnu/libdatrie* /usr/lib/x86_64-linux-gnu/
COPY --from=builder /usr/share/doc/libthai-data /usr/share/doc/libthai-data
COPY --from=builder /usr/share/doc/libthai0 /usr/share/doc/libthai0
COPY --from=builder /usr/share/libthai /usr/share/libthai
COPY --from=builder /build/thai_dictionary/hunspell/* /opt/bitnami/postgresql/share/tsearch_data/