feat: add parted
This commit is contained in:
parent
6ab34a5f45
commit
c2561d9e4d
1 changed files with 42 additions and 0 deletions
42
packages/parted/Containerfile
Normal file
42
packages/parted/Containerfile
Normal file
|
@ -0,0 +1,42 @@
|
|||
FROM scratch AS base
|
||||
ARG ARCH=x86_64
|
||||
ENV VERSION=3.6
|
||||
ENV SRC_HASH=3b43dbe33cca0f9a18601ebab56b7852b128ec1a3df3a9b30ccde5e73359e612
|
||||
ENV SRC_FILE=parted-${VERSION}.tar.xz
|
||||
ENV SRC_SITE=https://ftp.gnu.org/gnu/parted/${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/util-linux . /
|
||||
COPY --from=stagex/linux-headers . /
|
||||
COPY --from=stagex/pkgconf . /
|
||||
COPY --from=stagex/musl . /
|
||||
COPY --from=stagex/make . /
|
||||
COPY --from=stagex/gcc . /
|
||||
RUN tar -xf ${SRC_FILE}
|
||||
WORKDIR /parted-${VERSION}
|
||||
RUN --network=none <<-EOF
|
||||
set -ex
|
||||
./configure \
|
||||
--build=${ARCH}-linux-musl \
|
||||
--host=${ARCH}-linux-musl \
|
||||
--target=${ARCH}-linux-musl \
|
||||
--prefix=/usr \
|
||||
--enable-debug \
|
||||
--enable-shared \
|
||||
--without-readline \
|
||||
--disable-nls \
|
||||
--disable-shared \
|
||||
--disable-device-mapper
|
||||
make -j "$(nproc)"
|
||||
EOF
|
||||
|
||||
FROM build AS install
|
||||
RUN --network=none make DESTDIR="/rootfs" install
|
||||
|
||||
FROM stagex/filesystem AS package
|
||||
COPY --from=install /rootfs/. /
|
Loading…
Reference in a new issue