2024-08-08 07:47:42 +00:00
|
|
|
FROM scratch AS base
|
2024-03-22 06:26:29 +00:00
|
|
|
ENV VERSION=3.45.1
|
|
|
|
ENV SRC_HASH=af857d9ba958d26486639e2e0ffcd8be9d9f0d725fed0b174e017aa916d82d48
|
|
|
|
ENV SRC_FILE=vesion-${VERSION}.tar.gz
|
|
|
|
ENV SRC_SITE=https://github.com/sqlite/sqlite/archive/refs/tags/${SRC_FILE}
|
|
|
|
|
2024-08-08 07:47:42 +00:00
|
|
|
FROM base AS fetch
|
2024-03-22 06:26:29 +00:00
|
|
|
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
|
|
|
|
2024-08-08 07:47:42 +00:00
|
|
|
FROM fetch AS build
|
2024-03-22 06:26:29 +00:00
|
|
|
COPY --from=stagex/busybox . /
|
|
|
|
COPY --from=stagex/binutils . /
|
|
|
|
COPY --from=stagex/gcc . /
|
|
|
|
COPY --from=stagex/tcl . /
|
|
|
|
COPY --from=stagex/make . /
|
|
|
|
COPY --from=stagex/musl . /
|
|
|
|
RUN tar -xf ${SRC_FILE}
|
2024-08-26 01:18:52 +00:00
|
|
|
WORKDIR /sqlite-vesion-${VERSION}
|
2024-03-22 06:26:29 +00:00
|
|
|
RUN --network=none <<-EOF
|
|
|
|
set -eux
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr
|
|
|
|
make
|
|
|
|
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 DESTDIR=/rootfs install
|
2024-03-22 06:26:29 +00:00
|
|
|
|
2024-08-08 07:47:42 +00:00
|
|
|
FROM stagex/filesystem AS package
|
2024-03-22 06:26:29 +00:00
|
|
|
COPY --from=install /rootfs/. /
|