monacousa-db (sha256:36af916b48cb6a9ec131eeefbe61224f6d8323203d7aae540ae090dee893fd88)

Published 2026-02-10 20:26:49 +01:00 by matt

Installation

docker pull code.letsbe.solutions/letsbe/monacousa-db@sha256:36af916b48cb6a9ec131eeefbe61224f6d8323203d7aae540ae090dee893fd88
sha256:36af916b48cb6a9ec131eeefbe61224f6d8323203d7aae540ae090dee893fd88

Image Layers

ARG RELEASE
ARG LAUNCHPAD_BUILD_ARCH
LABEL org.opencontainers.image.ref.name=ubuntu
LABEL org.opencontainers.image.version=20.04
ADD file:7486147a645d8835a5181c79f00a3606c6b714c83bcbfcd8862221eb14690f9e in /
CMD ["/bin/bash"]
RUN /bin/sh -c apt update -y && apt install -y curl gnupg lsb-release software-properties-common wget sudo && apt clean # buildkit
RUN /bin/sh -c adduser --system --home /var/lib/postgresql --no-create-home --shell /bin/bash --group --gecos "PostgreSQL administrator" postgres # buildkit
RUN /bin/sh -c adduser --system --no-create-home --shell /bin/bash --group wal-g # buildkit
RUN /bin/sh -c curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --init none --no-confirm --extra-conf "substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com" --extra-conf "trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" # buildkit
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/nix/var/nix/profiles/default/bin
COPY . /nixpg # buildkit
WORKDIR /nixpg
RUN /bin/sh -c nix profile install .#psql_15/bin # buildkit
RUN /bin/sh -c nix store gc # buildkit
WORKDIR /
RUN /bin/sh -c mkdir -p /usr/lib/postgresql/bin /usr/lib/postgresql/share/postgresql /usr/share/postgresql /var/lib/postgresql && chown -R postgres:postgres /usr/lib/postgresql && chown -R postgres:postgres /var/lib/postgresql && chown -R postgres:postgres /usr/share/postgresql # buildkit
RUN /bin/sh -c ln -s /nix/var/nix/profiles/default/bin/* /usr/lib/postgresql/bin/ && ln -s /nix/var/nix/profiles/default/bin/* /usr/bin/ && chown -R postgres:postgres /usr/bin # buildkit
RUN /bin/sh -c ln -s /nix/var/nix/profiles/default/share/postgresql/* /usr/lib/postgresql/share/postgresql/ # buildkit
RUN /bin/sh -c ln -s /nix/var/nix/profiles/default/share/postgresql/* /usr/share/postgresql/ # buildkit
RUN /bin/sh -c chown -R postgres:postgres /usr/lib/postgresql/share/postgresql/ # buildkit
RUN /bin/sh -c chown -R postgres:postgres /usr/share/postgresql/ # buildkit
RUN /bin/sh -c mkdir -p /usr/lib/postgresql/share/postgresql/contrib && find /nix/var/nix/profiles/default/share/postgresql/contrib/ -mindepth 1 -type d -exec sh -c 'for dir do ln -s "$dir" "/usr/lib/postgresql/share/postgresql/contrib/$(basename "$dir")"; done' sh {} + && chown -R postgres:postgres /usr/lib/postgresql/share/postgresql/contrib/ # buildkit
RUN /bin/sh -c chown -R postgres:postgres /usr/lib/postgresql # buildkit
RUN /bin/sh -c ln -sf /usr/lib/postgresql/share/postgresql/timezonesets /usr/share/postgresql/timezonesets # buildkit
RUN /bin/sh -c apt-get update && apt-get install -y --no-install-recommends tzdata # buildkit
RUN /bin/sh -c ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime && dpkg-reconfigure --frontend noninteractive tzdata # buildkit
RUN /bin/sh -c apt-get update && apt-get install -y --no-install-recommends build-essential checkinstall cmake # buildkit
ENV PGDATA=/var/lib/postgresql/data
ARG TARGETARCH
RUN |1 TARGETARCH=amd64 /bin/sh -c apt-get update && apt-get install -y --no-install-recommends gnupg ca-certificates && rm -rf /var/lib/apt/lists/* # buildkit
ARG GOSU_VERSION=1.16
ARG GOSU_GPG_KEY=B42F6819007F00F88E364FD4036A9C25BF357DD4
ADD https://github.com/tianon/gosu/releases/download/1.16/gosu-amd64 /usr/local/bin/gosu # buildkit
ADD https://github.com/tianon/gosu/releases/download/1.16/gosu-amd64.asc /usr/local/bin/gosu.asc # buildkit
RUN |3 TARGETARCH=amd64 GOSU_VERSION=1.16 GOSU_GPG_KEY=B42F6819007F00F88E364FD4036A9C25BF357DD4 /bin/sh -c gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys $GOSU_GPG_KEY && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu && gpgconf --kill all && chmod +x /usr/local/bin/gosu # buildkit
RUN /bin/sh -c id postgres || (echo "postgres user does not exist" && exit 1) # buildkit
COPY /tmp/wal-g /usr/local/bin/ # buildkit
COPY ansible/files/postgresql_config/postgresql.conf.j2 /etc/postgresql/postgresql.conf # buildkit
COPY ansible/files/postgresql_config/pg_hba.conf.j2 /etc/postgresql/pg_hba.conf # buildkit
COPY ansible/files/postgresql_config/pg_ident.conf.j2 /etc/postgresql/pg_ident.conf # buildkit
COPY ansible/files/postgresql_config/postgresql-stdout-log.conf /etc/postgresql/logging.conf # buildkit
COPY ansible/files/postgresql_config/supautils.conf.j2 /etc/postgresql-custom/supautils.conf # buildkit
COPY ansible/files/postgresql_extension_custom_scripts /etc/postgresql-custom/extension-custom-scripts # buildkit
COPY ansible/files/pgsodium_getkey_urandom.sh.j2 /usr/lib/postgresql/bin/pgsodium_getkey.sh # buildkit
COPY ansible/files/postgresql_config/custom_read_replica.conf.j2 /etc/postgresql-custom/read-replica.conf # buildkit
COPY ansible/files/postgresql_config/custom_walg.conf.j2 /etc/postgresql-custom/wal-g.conf # buildkit
COPY ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh # buildkit
COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh # buildkit
RUN /bin/sh -c sed -i -e "s|#unix_socket_directories = '/tmp'|unix_socket_directories = '/var/run/postgresql'|g" -e "s|#session_preload_libraries = ''|session_preload_libraries = 'supautils'|g" -e "s|#include = '/etc/postgresql-custom/supautils.conf'|include = '/etc/postgresql-custom/supautils.conf'|g" -e "s|#include = '/etc/postgresql-custom/wal-g.conf'|include = '/etc/postgresql-custom/wal-g.conf'|g" /etc/postgresql/postgresql.conf && echo "cron.database_name = 'postgres'" >> /etc/postgresql/postgresql.conf && echo "pgsodium.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && echo "vault.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && echo 'auto_explain.log_min_duration = 10s' >> /etc/postgresql/postgresql.conf && usermod -aG postgres wal-g && mkdir -p /etc/postgresql-custom && chown postgres:postgres /etc/postgresql-custom # buildkit
COPY migrations/db /docker-entrypoint-initdb.d/ # buildkit
COPY ansible/files/pgbouncer_config/pgbouncer_auth_schema.sql /docker-entrypoint-initdb.d/init-scripts/00-schema.sql # buildkit
COPY ansible/files/stat_extension.sql /docker-entrypoint-initdb.d/migrations/00-extension.sql # buildkit
COPY /usr/local/bin/gosu /usr/local/bin/gosu # buildkit
ADD https://github.com/docker-library/postgres/raw/master/15/bullseye/docker-entrypoint.sh /usr/local/bin/ # buildkit
RUN /bin/sh -c mkdir -p /var/run/postgresql && chown postgres:postgres /var/run/postgresql # buildkit
ENTRYPOINT ["docker-entrypoint.sh"]
HEALTHCHECK &{["CMD-SHELL" "pg_isready -U postgres -h localhost"] "2s" "2s" "0s" "0s" '\n'}
STOPSIGNAL SIGINT
EXPOSE map[5432/tcp:{}]
ENV POSTGRES_HOST=/var/run/postgresql
ENV POSTGRES_USER=supabase_admin
ENV POSTGRES_DB=postgres
RUN /bin/sh -c apt-get update && apt-get install -y --no-install-recommends locales && rm -rf /var/lib/apt/lists/* && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && localedef -i C -c -f UTF-8 -A /usr/share/locale/locale.alias C.UTF-8 # buildkit
RUN /bin/sh -c echo "C.UTF-8 UTF-8" > /etc/locale.gen && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && locale-gen # buildkit
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
ENV LC_CTYPE=C.UTF-8
ENV LC_COLLATE=C.UTF-8
ENV LOCALE_ARCHIVE=/usr/lib/locale/locale-archive
RUN /bin/sh -c mkdir -p /usr/share/postgresql/extension/ && ln -s /usr/lib/postgresql/bin/pgsodium_getkey.sh /usr/share/postgresql/extension/pgsodium_getkey && chmod +x /usr/lib/postgresql/bin/pgsodium_getkey.sh # buildkit
CMD ["postgres" "-D" "/etc/postgresql"]
COPY 00-init-schemas.sql /docker-entrypoint-initdb.d/00-init-schemas.sql # buildkit
COPY migrate.sh /docker-entrypoint-initdb.d/migrate.sh # buildkit

Labels

Key Value
org.opencontainers.image.created 2026-02-10T19:26:10.911Z
org.opencontainers.image.description
org.opencontainers.image.licenses
org.opencontainers.image.ref.name ubuntu
org.opencontainers.image.revision 549ace87c6cef70fde9975d45a0420fabb22b60b
org.opencontainers.image.source https://code.letsbe.solutions/letsbe/monacousa-portal
org.opencontainers.image.title monacousa-portal
org.opencontainers.image.url https://code.letsbe.solutions/letsbe/monacousa-portal
org.opencontainers.image.version main
Details
Container
2026-02-10 20:26:49 +01:00
0
OCI / Docker
linux/amd64
651 MiB
Versions (2) View all
main 2026-02-10
latest 2026-02-10