-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (44 loc) · 1.43 KB
/
Dockerfile
File metadata and controls
57 lines (44 loc) · 1.43 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
48
49
50
51
52
53
54
55
56
57
ARG PGVERSION=15
FROM postgis/postgis:${PGVERSION}-master AS base-image
ARG PGVERSION=15
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
build-essential \
cmake \
postgresql-server-dev-$PGVERSION \
libcurl4-openssl-dev \
libicu-dev
FROM base-image AS pgmq
RUN git clone https://github.com/pgmq/pgmq.git && \
cd pgmq/pgmq-extension && \
make && \
make install
FROM base-image AS pg_net
RUN git clone --branch v0.7.3 --depth 1 https://github.com/supabase/pg_net.git && \
cd pg_net && \
make with_llvm=no && \
make with_llvm=no install
FROM base-image AS final-stage
ARG PGVERSION=15
RUN apt-get update && \
apt-get install -y --no-install-recommends \
postgresql-$PGVERSION-cron \
libcurl3-gnutls && \
apt-get purge -y --auto-remove && \
rm -rf /var/lib/apt/lists/*
COPY --from=pgmq \
/usr/share/postgresql/$PGVERSION/extension/pgmq* \
/usr/share/postgresql/$PGVERSION/extension/
COPY --from=pgmq \
/usr/lib/postgresql/$PGVERSION/lib/pgmq* \
/usr/lib/postgresql/$PGVERSION/lib/
COPY --from=pg_net \
/usr/share/postgresql/$PGVERSION/extension/pg_net* \
/usr/share/postgresql/$PGVERSION/extension/
COPY --from=pg_net \
/usr/lib/postgresql/$PGVERSION/lib/pg_net* \
/usr/lib/postgresql/$PGVERSION/lib/
COPY ./conf.sh /docker-entrypoint-initdb.d/z_conf.sh