forked from cmwedding-it/docker-postgres-autoconf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
46 lines (44 loc) · 1.39 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
ARG BASE_TAG
FROM docker.io/postgres:${BASE_TAG}
ENTRYPOINT [ "/autoconf-entrypoint" ]
CMD []
ENV CERTS="{}" \
CONF_EXTRA="" \
LAN_AUTH_METHOD=md5 \
LAN_CONNECTION=host \
LAN_DATABASES='["all"]' \
LAN_HBA_TPL="{connection} {db} {user} {cidr} {meth}" \
LAN_TLS=0 \
LAN_USERS='["all"]' \
WAN_AUTH_METHOD=cert \
WAN_CONNECTION=hostssl \
WAN_DATABASES='["all"]' \
WAN_HBA_TPL="{connection} {db} {user} {cidr} {meth}" \
WAN_TLS=1 \
WAN_USERS='["all"]'
RUN apk add --no-cache python3 \
&& mkdir -p /etc/postgres \
&& chmod a=rwx /etc/postgres
RUN apk add --no-cache py3-netifaces
COPY autoconf-entrypoint /
RUN apk add --no-cache -t .build \
postgresql-dev postgresql-contrib \
curl-dev libcurl \
wget jq cmake build-base ca-certificates py3-pip pipx && \
pipx ensurepath && \
pipx install pgxnclient && \
export PATH=$PATH:/root/.local/bin && \
pgxn install pg_qualstats && \
pgxn install pg_stat_kcache && \
pgxn install pg_track_settings && \
pgxn install powa && \
pgxn install postgresql_anonymizer && \
apk del .build
# Metadata
ARG VCS_REF
ARG BUILD_DATE
LABEL org.label-schema.vendor=openspp \
org.label-schema.license=Apache-2.0 \
org.label-schema.build-date="$BUILD_DATE" \
org.label-schema.vcs-ref="$VCS_REF" \
org.label-schema.vcs-url="https://github.com/openspp/docker-postgres-autoconf"