stagex/packages/redis/Containerfile
2024-08-26 11:24:57 -07:00

28 lines
809 B
Docker

FROM scratch AS base
ENV VERSION=7.2.4
ENV SRC_FILE=redis-${VERSION}.tar.gz
ENV SRC_SITE=https://download.redis.io/releases/${SRC_FILE}
ENV SRC_HASH=8d104c26a154b29fd67d6568b4f375212212ad41e0c2caa3d66480e78dbd3b59
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/musl . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/perl . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/make . /
COPY --from=stagex/openssl . /
RUN tar -xf ${SRC_FILE}
WORKDIR /redis-${VERSION}
ENV SOURCE_DATE_EPOCH=1
RUN make BUILD_TLS=yes all
FROM build AS install
RUN --network=none make install PREFIX="/rootfs" INSTALL_BIN="/rootfs/usr/bin"
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /