mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 17:49:10 +00:00
tools: Fix mkimage-raw-efi
Use a scratch image as the base instead of the full alpine base. Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
This commit is contained in:
parent
24d8ecc943
commit
fe569b627a
@ -1,20 +1,17 @@
|
|||||||
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS grub-build
|
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS grub-build
|
||||||
|
|
||||||
RUN apk add \
|
RUN apk add \
|
||||||
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
make \
|
|
||||||
bison \
|
bison \
|
||||||
gettext \
|
|
||||||
flex \
|
|
||||||
gcc \
|
gcc \
|
||||||
|
gettext \
|
||||||
git \
|
git \
|
||||||
libtool \
|
flex \
|
||||||
libc-dev \
|
libc-dev \
|
||||||
|
libtool \
|
||||||
linux-headers \
|
linux-headers \
|
||||||
python3 \
|
make \
|
||||||
|
python3
|
||||||
autoconf
|
|
||||||
|
|
||||||
# because python is not available
|
# because python is not available
|
||||||
RUN ln -s python3 /usr/bin/python
|
RUN ln -s python3 /usr/bin/python
|
||||||
|
|
||||||
@ -40,21 +37,24 @@ RUN mkdir /grub-lib && \
|
|||||||
;; \
|
;; \
|
||||||
esac
|
esac
|
||||||
|
|
||||||
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS make-img
|
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS mirror
|
||||||
|
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
|
||||||
RUN \
|
RUN apk add --no-cache --initdb -p /out \
|
||||||
apk update && apk upgrade && \
|
alpine-baselayout \
|
||||||
apk add --no-cache \
|
binutils \
|
||||||
|
busybox \
|
||||||
dosfstools \
|
dosfstools \
|
||||||
libarchive-tools \
|
libarchive-tools \
|
||||||
binutils \
|
|
||||||
mtools \
|
mtools \
|
||||||
sfdisk \
|
sfdisk \
|
||||||
sgdisk \
|
sgdisk \
|
||||||
xfsprogs \
|
xfsprogs \
|
||||||
&& true
|
&& true
|
||||||
|
RUN mv /out/etc/apk/repositories.upstream /out/etc/apk/repositories
|
||||||
|
|
||||||
COPY . .
|
FROM scratch
|
||||||
|
WORKDIR /
|
||||||
|
COPY --from=mirror /out/ /
|
||||||
COPY --from=grub-build /grub-lib/BOOT*.EFI /usr/local/share/
|
COPY --from=grub-build /grub-lib/BOOT*.EFI /usr/local/share/
|
||||||
|
COPY . .
|
||||||
ENTRYPOINT [ "/make-efi" ]
|
ENTRYPOINT [ "/make-efi" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user