-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
46 lines (38 loc) · 2.26 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
FROM docker.io/bitnami/minideb:buster
LABEL maintainer "Bitnami <[email protected]>"
ENV HOME="/" \
OS_ARCH="amd64" \
OS_FLAVOUR="debian-10" \
OS_NAME="linux"
COPY prebuildfs /
# Install required system packages and dependencies
RUN install_packages acl ca-certificates curl gzip libbsd0 libc6 libedit2 libffi6 libgcc1 libgmp10 libgnutls30 libhogweed4 libicu63 libidn2-0 libldap-2.4-2 liblzma5 libnettle6 libp11-kit0 libpcre3 libreadline7 libsasl2-2 libsqlite3-0 libssl1.1 libstdc++6 libtasn1-6 libtinfo6 libunistring2 libuuid1 libxml2 libxslt1.1 locales procps tar zlib1g
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "postgresql-repmgr" "13.4.0-8" --checksum 69dd2b86be687d6986fa95b4ea2db996b1f48fc1ffa33bdce5538396a3888501
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "gosu" "1.14.0-0" --checksum 3e6fc37ca073b10a73a804d39c2f0c028947a1a596382a4f8ebe43dfbaa3a25e
RUN chmod g+rwX /opt/bitnami
RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8
RUN update-locale LANG=C.UTF-8 LC_MESSAGES=POSIX && \
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales
RUN echo 'en_GB.UTF-8 UTF-8' >> /etc/locale.gen && locale-gen
RUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && locale-gen
COPY rootfs /
RUN /opt/bitnami/scripts/postgresql-repmgr/postunpack.sh
RUN /opt/bitnami/scripts/locales/add-extra-locales.sh
ENV BITNAMI_APP_NAME="postgresql-repmgr" \
BITNAMI_IMAGE_VERSION="13.4.0-debian-10-r59" \
LANG="en_US.UTF-8" \
LANGUAGE="en_US:en" \
NSS_WRAPPER_LIB="/opt/bitnami/common/lib/libnss_wrapper.so" \
PATH="/opt/bitnami/postgresql/bin:/opt/bitnami/repmgr/bin:/opt/bitnami/common/bin:$PATH"
# Install zombodb extension
COPY zombodb_debian-buster_pg13-3000.0.3_amd64.deb ./
RUN dpkg --force-architecture -i zombodb_debian-buster_pg13-3000.0.3_amd64.deb
RUN cp /usr/lib/postgresql/13/lib/zombodb.so /opt/bitnami/postgresql/lib/
RUN cp -r /usr/share/postgresql/13/extension/. /opt/bitnami/postgresql/share/extension/
VOLUME [ "/bitnami/postgresql", "/docker-entrypoint-initdb.d", "/docker-entrypoint-preinitdb.d" ]
# Create extensions
COPY create-extensions.sql ./docker-entrypoint-initdb.d/
EXPOSE 5432
USER 1001
ENTRYPOINT [ "/opt/bitnami/scripts/postgresql-repmgr/entrypoint.sh" ]
CMD [ "/opt/bitnami/scripts/postgresql-repmgr/run.sh" ]