Skip to content

Commit

Permalink
grub: Improve Dockerfile to build GRUB faster
Browse files Browse the repository at this point in the history
This commit improves the Dockerfile in order to remove a dependency of the
whole source folder in pkg/grub. Currently, when the rootfs.cfg is updated,
the whole GRUB is unnecessarily re-built. Copying only the needed files, we
can make better use of Docker layers.

Signed-off-by: Renê de Souza Pinto <[email protected]>
  • Loading branch information
rene authored and eriknordmark committed Nov 3, 2023
1 parent 143edb7 commit 034e50a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/grub/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ FROM grub-build-${TARGETARCH} AS grub-build

ENV GRUB_REPO=https://git.savannah.gnu.org/cgit/grub.git

COPY / /
COPY patches /patches
COPY patches-2.06 /patches-2.06
COPY patches-aarch64-2.06 /patches-aarch64-2.06
COPY patches-riscv64-2.06 /patches-riscv64-2.06
# because python is not available
RUN ln -s python3 /usr/bin/python && \
mkdir /grub-lib
Expand Down

0 comments on commit 034e50a

Please sign in to comment.