-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (38 loc) · 1.4 KB
/
Dockerfile
File metadata and controls
47 lines (38 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
ARG PG_MAJOR=18
FROM postgres:$PG_MAJOR-trixie AS build
WORKDIR /work
COPY . .
RUN apt-get update && apt-get install -y --no-install-recommends \
postgresql-server-dev-$PG_MAJOR \
libcurl4-openssl-dev \
uuid-dev \
make \
cmake \
libssl-dev \
libre2-dev \
pgxnclient \
unzip \
g++
RUN make && make install DESTDIR=/dest
# Build the latest stable version of the re2 extension.
RUN cd /tmp && pgxn download re2 && unzip re2-*.zip && rm re2-*.zip && cd re2-* && make && make install DESTDIR=/dest
FROM postgres:$PG_MAJOR-trixie
# Install dependencies
RUN apt-get update && apt-get install -y --no-install-recommends libcurl4t64 uuid libre2-11 ca-certificates \
&& apt-get clean \
&& rm -rf /var/cache/apt/* /var/lib/apt/lists/*
# Install extension files.
COPY --chmod=644 --from=build \
/dest/usr/share/postgresql/$PG_MAJOR/extension/*.* \
/usr/share/postgresql/$PG_MAJOR/extension/
# Install shared libraries.
COPY --chmod=755 --from=build \
/dest/usr/lib/postgresql/$PG_MAJOR/lib/*.so* \
/usr/lib/postgresql/$PG_MAJOR/lib/
# Install bitcode files.
COPY --chmod=644 --from=build \
/dest/usr/lib/postgresql/$PG_MAJOR/lib/bitcode/*.bc \
/usr/lib/postgresql/$PG_MAJOR/lib/bitcode/
COPY --chmod=644 --from=build \
/dest/usr/lib/postgresql/$PG_MAJOR/lib/bitcode/pg_clickhouse/src/*.bc \
/usr/lib/postgresql/$PG_MAJOR/lib/bitcode/pg_clickhouse/src/