Skip to content

Commit 8ab2f3c

Browse files
committed
Wrong binary
1 parent c72c98f commit 8ab2f3c

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

Containerfile.mkfs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
FROM alpine:latest AS build
2-
ARG UTIL_LINUX_VERSION=2.41
32
WORKDIR /usr/src
43

54
# build dependencies
65
RUN apk update && apk add build-base linux-headers autoconf gettext-dev automake flex bison libtool git
76

8-
ENV UTIL_LINUX_VERSION=${UTIL_LINUX_VERSION}
9-
RUN git clone https://github.com/util-linux/util-linux.git --branch v$UTIL_LINUX_VERSION
10-
WORKDIR /usr/src/util-linux
7+
ARG REPO=https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
8+
9+
RUN E2FS_LATEST_VER=$(git -c 'versionsort.suffix=-' \
10+
ls-remote --exit-code --refs --sort='version:refname' --tags $REPO '*.*.*' \
11+
| tail -n 1 \
12+
| cut -d '/' -f 3) && \
13+
git clone https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git --branch $E2FS_LATEST_VER
14+
1115
ENV CFLAGS="-O2 -Wall -static"
1216
ENV LDFLAGS="--static"
13-
RUN ./autogen.sh && ./configure --disable-all-programs --enable-mkfs && make -j`nproc` mkfs
17+
WORKDIR /usr/src/e2fsprogs
18+
RUN mkdir build
19+
RUN cd build && ../configure && make -j`nproc`
1420

1521
FROM scratch AS final
16-
COPY --from=build /usr/src/util-linux/mkfs /mkfs
22+
COPY --from=build /usr/src/e2fsprogs/build/misc/mke2fs /mkfs.ext4

0 commit comments

Comments
 (0)