-
Notifications
You must be signed in to change notification settings - Fork 78
/
Dockerfile
58 lines (47 loc) · 1.28 KB
/
Dockerfile
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
58
#syntax=docker/dockerfile:1
FROM postgres_base
ARG PYTHON_VERSION
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
# http deps
ca-certificates \
libcurl4-gnutls-dev \
# mysql deps
default-libmysqlclient-dev \
# multicorn deps
python${PYTHON_VERSION} \
python${PYTHON_VERSION}-dev \
# s3 deps
lsb-release \
wget \
; \
rm -rf /var/lib/apt/lists/*
# mysql ext
COPY --from=mysql /pg_ext /
# http ext
COPY --from=http /pg_ext /
# multicorn ext
COPY --from=multicorn /pg_ext /
COPY --from=multicorn /python-dist-packages /usr/local/lib/python${PYTHON_VERSION}/dist-packages
# s3 ext
COPY --from=s3 /pg_ext /
COPY third-party/s3/scripts /tmp
RUN set -eux; \
/tmp/install-arrow; \
rm -f /tmp/install
COPY --from=s3 /lib/* /s3_lib/
RUN cp -r /s3_lib/* /usr/lib/$(uname -m)-linux-gnu/
# ivm ext
COPY --from=ivm /pg_ivm /
# columnar ext
COPY --from=columnar /pg_ext /
COPY files/postgres/docker-entrypoint-initdb.d /docker-entrypoint-initdb.d/
# Install pgxman extensions
ARG POSTGRES_BASE_VERSION
# Always force rebuild of this layer
ARG TIMESTAMP=1
COPY third-party/pgxman_install.sh /tmp/pgxman_install.sh
RUN set -eux; \
/tmp/pgxman_install.sh ${POSTGRES_BASE_VERSION}; \
rm -f /tmp/pgxman_install.sh