stagex/packages/postgresql/Containerfile

61 lines
1.6 KiB
Text
Raw Normal View History

2024-08-08 07:47:42 +00:00
FROM scratch AS base
2024-03-21 00:24:00 +00:00
ENV VERSION=16.2
ENV SRC_HASH=2b8201047ec81acd1bad29dba278d788e7891b9c3e8232eda16bb29dec8131c7
ENV SRC_FILE=postgresql-${VERSION}.tar.gz
ENV SRC_SITE=https://ftp.postgresql.org/pub/source/v16.2/${SRC_FILE}
2024-08-08 07:47:42 +00:00
FROM base AS fetch
2024-03-21 00:24:00 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
2024-08-08 07:47:42 +00:00
FROM fetch AS build
2024-03-21 00:24:00 +00:00
COPY --from=stagex/busybox . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/musl . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/icu . /
2024-08-14 10:12:27 +00:00
COPY --from=stagex/llvm . /
2024-03-21 00:24:00 +00:00
COPY --from=stagex/zlib . /
COPY --from=stagex/gcc . /
2024-08-14 00:52:57 +00:00
COPY --from=stagex/clang16 . /
2024-03-21 00:24:00 +00:00
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
2024-08-08 07:47:42 +00:00
FROM build AS install
2024-04-11 20:09:20 +00:00
RUN --network=none make install-world DESTDIR=/rootfs
2024-03-21 00:24:00 +00:00
2024-08-08 07:47:42 +00:00
FROM stagex/filesystem AS package
2024-03-21 00:24:00 +00:00
COPY --from=install /rootfs/. /