Source
FROM stagex/pallet-clang-gnu-busybox AS build
ARG VERSION
COPY --from=stagex/pallet-python . /
COPY --from=stagex/core-tcl . /
COPY --from=stagex/core-readline . /
COPY --from=stagex/core-icu . /
COPY --from=stagex/core-tcl . /
COPY --from=stagex/core-libxml2 . /
COPY --from=stagex/user-util-linux . /
COPY --from=stagex/user-e2fsprogs . /
ADD fetch/postgresql13-${VERSION}.tar.gz .
WORKDIR /postgresql-${VERSION}
RUN --network=none <<-EOF
set -eux
./configure \
--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
make install-world DESTDIR=/rootfs
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /