-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
49 lines (37 loc) · 1.31 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
ARG repo="https://github.com/linux-surface/grub.git"
ARG ref="fedora-39"
# build stage
FROM fedora:latest as build
RUN dnf update -y \
&& dnf install -y \
make \
rpmdevtools \
gcc-aarch64-linux-gnu \
python \
"dnf-command(builddep)" \
&& dnf builddep -y grub2
ARG repo
ARG ref
RUN git clone "${repo}" grub \
&& cd grub \
&& git checkout "${ref}"
RUN cd grub \
&& ./bootstrap \
&& ./configure \
HOST_CPPFLAGS="-I$(pwd)" \
TARGET_CPPFLAGS="-I$(pwd)" \
--with-platform="efi" \
--with-utils="host" \
--program-prefix="aarch64-" \
--disable-werror \
--disable-rpm-sort \
--target="aarch64-linux-gnu"
RUN cd grub && make -j $(nproc)
RUN cd grub && make DESTDIR="${PWD}/../install" install
# application stage
FROM fedora:latest as env
RUN dnf update -y \
&& dnf install -y \
gettext file mtools device-mapper-libs
COPY --from=build install/ /
CMD /bin/bash