Merge remote-tracking branch 'origin/turnalek/postgresql13' into staging

This commit is contained in:
Lance R. Vick 2024-10-15 16:08:13 -07:00
commit f13ba6f403
No known key found for this signature in database
GPG key ID: 8E47A1EC35A1551D

View file

@ -0,0 +1,60 @@
FROM scratch AS base
ENV VERSION=13.16
ENV SRC_HASH=33647543546202825bdf89bfb71523b5aea12b3b0153a689f694a08ed02aa204
ENV SRC_FILE=postgresql-${VERSION}.tar.gz
ENV SRC_SITE=https://ftp.postgresql.org/pub/source/v${VERSION}/${SRC_FILE}
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/musl . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/icu . /
COPY --from=stagex/llvm . /
COPY --from=stagex/zlib . /
COPY --from=stagex/gcc . /
COPY --from=stagex/clang . /
COPY --from=stagex/perl . /
COPY --from=stagex/ncurses . /
COPY --from=stagex/bison . /
COPY --from=stagex/flex . /
COPY --from=stagex/libxml2 . /
COPY --from=stagex/python . /
COPY --from=stagex/openssl . /
COPY --from=stagex/readline . /
COPY --from=stagex/util-linux . /
COPY --from=stagex/linux-headers . /
COPY --from=stagex/e2fsprogs . /
COPY --from=stagex/tcl . /
RUN tar -xf ${SRC_FILE}
WORKDIR /postgresql-${VERSION}
RUN --network=none <<-EOF
set -eux
./configure \
--build=x86_64-linux-musl \
--host=x86_64-linux-musl \
--prefix=/usr \
--mandir=/usr/share/man \
--with-libxml \
--with-openssl \
--with-uuid=e2fs \
--disable-rpath \
--with-llvm \
--with-perl \
--with-python \
--with-icu \
--with-tcl \
--with-readline
make -j "$(nproc)" world
EOF
FROM build AS install
RUN --network=none make install-world DESTDIR=/rootfs
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /