Skip to content

Commit

Permalink
fdisk: add more targets from more-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
ansemjo committed Jun 17, 2024
1 parent 703ec49 commit 8a77d94
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Available build targets are given by the Dockerfiles in [`build/`](build/):

* `make busybox`
* `make curl`
* `make fdisk`
* `make fdisk` (includes `blkid`, `losetup`, `(u)mount`, `nsenter` & `unshare`)
* `make git`
* `make gpg`
* `make make`
Expand Down
14 changes: 12 additions & 2 deletions build/fdisk
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,15 @@ ENV LDFLAGS="-Wl,-z,now -Wl,-z,relro -static -s"
ENV CFLAGS="-fPIC -pie -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -static -s"
RUN ./configure \
--enable-static \
--enable-static-programs=fdisk,sfdisk \
--enable-static-programs=fdisk,sfdisk,blkid,losetup,mount,umount,nsenter,unshare \
--disable-pylibmount \
--without-python \
--disable-liblastlog2 \
&& make -j$(nproc) fdisk.static sfdisk.static \
&& make -j$(nproc) \
fdisk.static sfdisk.static \
blkid.static losetup.static \
mount.static umount.static \
nsenter.static unshare.static \
&& (ldd fdisk.static && exit 1 || true) \
&& (ldd sfdisk.static && exit 1 || true)

Expand All @@ -60,3 +64,9 @@ COPY fdisk /Dockerfile
FROM scratch as binary
COPY --from=build /build/fdisk.static /fdisk
COPY --from=build /build/sfdisk.static /sfdisk
COPY --from=build /build/blkid.static /blkid
COPY --from=build /build/losetup.static /losetup
COPY --from=build /build/mount.static /mount
COPY --from=build /build/umount.static /umount
COPY --from=build /build/nsenter.static /nsenter
COPY --from=build /build/unshare.static /unshare

0 comments on commit 8a77d94

Please sign in to comment.