2026-09-17 21:29:50 UTC
114 MB
llvm21-dev clang21
GOSU_VERSION1.19
LANGen_US.utf8
PATH/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PGDATA/var/lib/postgresql/18/docker
PG_MAJOR18
PG_SHA256555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f
PG_VERSION18.6
[#000] sha256:e2de96513ba9eb53b431787ec8a65cdde380ac4772a3e4c4b714dcfde2a102b5 - 3.21% (3.67 MB)
[#001] sha256:976cd45ecd0f5afcb47e7ee68e70f2f8632a1e621e465632cf38a6bd06563aad - 0.0% (968 Bytes)
[#002] sha256:d8f47ca787e9d08adaacc8d2a9d91e78e65e37706ef159ee52daae848c58bdd9 - 0.75% (880 KB)
[#003] sha256:30b4807a96db4dc1287cec075f24db70aad9e7b1307dcbc52a20e26a98e12cfe - 0.0% (116 Bytes)
[#004] sha256:23ebd67725253ed5be1425c468541541ba6034ec0acce3fc3c388df36c503d70 - 96.02% (110 MB)
[#005] sha256:e5545be08ab6c7da866f9eb293b5583146b729e72ec499e3bae843b808aa8636 - 0.02% (18.6 KB)
[#006] sha256:a7fe9499841704ecc44978c38c723c55ed198cef686e90cdee890e5609a9c6de - 0.0% (128 Bytes)
[#007] sha256:176ab66edd3909a2f90886b538b88fabfc9751709dd6bf335c9374448c6f77e5 - 0.01% (5.97 KB)
[#008] sha256:5ef7ae0adbc8a98b2be3aa5546451f12ccb858a38079d10be3c4a0717ae6dfc5 - 0.0% (183 Bytes)
ADD alpine-minirootfs-3.24.2-x86_64.tar.gz / # buildkit
2026-09-17 20:37:20 UTC (buildkit.dockerfile.v0)CMD ["/bin/sh"]
2026-09-17 21:27:11 UTC (buildkit.dockerfile.v0)RUN /bin/sh -c set -eux; addgroup -g 70 -S postgres; adduser -u 70 -S -D -G postgres -H -h /var/lib/postgresql -s /bin/sh postgres; install --verbose --directory --owner postgres --group postgres --mode 1777 /var/lib/postgresql # buildkit
2026-09-17 21:27:13 UTC (buildkit.dockerfile.v0)ENV GOSU_VERSION=1.19
2026-09-17 21:27:13 UTC (buildkit.dockerfile.v0)RUN /bin/sh -c set -eux; apk add --no-cache --virtual .gosu-deps ca-certificates dpkg gnupg ; dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; export GNUPGHOME="$(mktemp -d)"; gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; gpgconf --kill all; rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; apk del --no-network .gosu-deps; chmod +x /usr/local/bin/gosu; gosu --version; gosu nobody true # buildkit
2026-09-17 21:27:13 UTC (buildkit.dockerfile.v0)ENV LANG=en_US.utf8
2026-09-17 21:27:14 UTC (buildkit.dockerfile.v0)RUN /bin/sh -c mkdir /docker-entrypoint-initdb.d # buildkit
2026-09-17 21:27:14 UTC (buildkit.dockerfile.v0)ENV PG_MAJOR=18
2026-09-17 21:27:14 UTC (buildkit.dockerfile.v0)ENV PG_VERSION=18.6
2026-09-17 21:27:14 UTC (buildkit.dockerfile.v0)ENV PG_SHA256=555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f
2026-09-17 21:27:14 UTC (buildkit.dockerfile.v0)ENV DOCKER_PG_LLVM_DEPS=llvm21-dev clang21
2026-09-17 21:29:49 UTC (buildkit.dockerfile.v0)RUN /bin/sh -c set -eux; wget -O postgresql.tar.bz2 "https://ftp.postgresql.org/pub/source/v$PG_VERSION/postgresql-$PG_VERSION.tar.bz2"; echo "$PG_SHA256 *postgresql.tar.bz2" | sha256sum -c -; mkdir -p /usr/src/postgresql; tar --extract --file postgresql.tar.bz2 --directory /usr/src/postgresql --strip-components 1 ; rm postgresql.tar.bz2; apk add --no-cache --virtual .build-deps $DOCKER_PG_LLVM_DEPS bison coreutils dpkg-dev dpkg flex g++ gcc krb5-dev libc-dev libedit-dev libxml2-dev libxslt-dev linux-headers make openldap-dev openssl-dev perl-dev perl-ipc-run perl-utils python3-dev tcl-dev util-linux-dev zlib-dev icu-dev lz4-dev zstd-dev curl-dev liburing-dev ; cd /usr/src/postgresql; awk '$1 == "#define" && $2 == "DEFAULT_PGSOCKET_DIR" && $3 == "\"/tmp\"" { $3 = "\"/var/run/postgresql\""; print; next } { print }' src/include/pg_config_manual.h > src/include/pg_config_manual.h.new; grep '/var/run/postgresql' src/include/pg_config_manual.h.new; mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h; gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; export LLVM_CONFIG="/usr/lib/llvm21/bin/llvm-config"; export CLANG=clang-21; ./configure --enable-option-checking=fatal --build="$gnuArch" --enable-integer-datetimes --enable-tap-tests --disable-rpath --with-uuid=e2fs --with-pgport=5432 --with-system-tzdata=/usr/share/zoneinfo --prefix=/usr/local --with-includes=/usr/local/include --with-libraries=/usr/local/lib --with-gssapi --with-icu --with-ldap --with-libcurl --with-liburing --with-libxml --with-libxslt --with-llvm --with-lz4 --with-openssl --with-perl --with-python --with-tcl --with-zstd ; make -j "$(nproc)" world-bin; make install-world-bin; make -C contrib install; runDeps="$( scanelf --needed --nobanner --format '%n#p' --recursive /usr/local | tr ',' '\n' | sort -u | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' | grep -v -e perl -e python -e tcl )"; apk add --no-cache --virtual .postgresql-rundeps $runDeps bash tzdata zstd icu-data-full $([ "$(apk --print-arch)" != 'ppc64le' ] && echo 'nss_wrapper') ; apk del --no-network .build-deps; cd /; rm -rf /usr/src/postgresql /usr/local/share/doc /usr/local/share/man ; postgres --version # buildkit
2026-09-17 21:29:49 UTC (buildkit.dockerfile.v0)RUN /bin/sh -c set -eux; cp -v /usr/local/share/postgresql/postgresql.conf.sample /usr/local/share/postgresql/postgresql.conf.sample.orig; sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/local/share/postgresql/postgresql.conf.sample; grep -F "listen_addresses = '*'" /usr/local/share/postgresql/postgresql.conf.sample # buildkit
2026-09-17 21:29:50 UTC (buildkit.dockerfile.v0)RUN /bin/sh -c install --verbose --directory --owner postgres --group postgres --mode 3777 /var/run/postgresql # buildkit
2026-09-17 21:29:50 UTC (buildkit.dockerfile.v0)ENV PGDATA=/var/lib/postgresql/18/docker
2026-09-17 21:29:50 UTC (buildkit.dockerfile.v0)VOLUME [/var/lib/postgresql]
2026-09-17 21:29:50 UTC (buildkit.dockerfile.v0)COPY docker-entrypoint.sh docker-ensure-initdb.sh /usr/local/bin/ # buildkit
2026-09-17 21:29:50 UTC (buildkit.dockerfile.v0)RUN /bin/sh -c ln -sT docker-ensure-initdb.sh /usr/local/bin/docker-enforce-initdb.sh # buildkit
2026-09-17 21:29:50 UTC (buildkit.dockerfile.v0)ENTRYPOINT ["docker-entrypoint.sh"]
2026-09-17 21:29:50 UTC (buildkit.dockerfile.v0)STOPSIGNAL SIGINT
2026-09-17 21:29:50 UTC (buildkit.dockerfile.v0)EXPOSE map[5432/tcp:{}]
2026-09-17 21:29:50 UTC (buildkit.dockerfile.v0)CMD ["postgres"]