mirror of
https://github.com/siderolabs/talos.git
synced 2025-08-16 03:27:12 +02:00
fix: build with custom kernel/rootfs
Fix ONBUILD initramfs path Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
This commit is contained in:
parent
5b5089ab95
commit
0f659622d0
@ -499,6 +499,7 @@ RUN apk add --no-cache --update \
|
|||||||
xorriso \
|
xorriso \
|
||||||
xz
|
xz
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
|
ENV TARGETARCH ${TARGETARCH}
|
||||||
COPY --from=install-artifacts / /
|
COPY --from=install-artifacts / /
|
||||||
COPY --from=installer-build /installer /bin/installer
|
COPY --from=installer-build /installer /bin/installer
|
||||||
RUN ln -s /bin/installer /bin/talosctl
|
RUN ln -s /bin/installer /bin/talosctl
|
||||||
@ -514,10 +515,10 @@ ONBUILD RUN apk add --no-cache --update \
|
|||||||
ONBUILD WORKDIR /initramfs
|
ONBUILD WORKDIR /initramfs
|
||||||
ONBUILD ARG RM
|
ONBUILD ARG RM
|
||||||
ONBUILD RUN xz -d /usr/install/${TARGETARCH}/initramfs.xz \
|
ONBUILD RUN xz -d /usr/install/${TARGETARCH}/initramfs.xz \
|
||||||
&& cpio -idvm < /usr/install/initramfs \
|
&& cpio -idvm < /usr/install/${TARGETARCH}/initramfs \
|
||||||
&& unsquashfs -f -d /rootfs rootfs.sqsh \
|
&& unsquashfs -f -d /rootfs rootfs.sqsh \
|
||||||
&& for f in ${RM}; do rm -rfv /rootfs$f; done \
|
&& for f in ${RM}; do rm -rfv /rootfs$f; done \
|
||||||
&& rm /usr/install/initramfs \
|
&& rm /usr/install/${TARGETARCH}/initramfs \
|
||||||
&& rm rootfs.sqsh
|
&& rm rootfs.sqsh
|
||||||
ONBUILD COPY --from=customization / /rootfs
|
ONBUILD COPY --from=customization / /rootfs
|
||||||
ONBUILD RUN find /rootfs \
|
ONBUILD RUN find /rootfs \
|
||||||
|
@ -31,7 +31,7 @@ FROM scratch AS customization
|
|||||||
COPY --from=<custom kernel image> /lib/modules /lib/modules
|
COPY --from=<custom kernel image> /lib/modules /lib/modules
|
||||||
|
|
||||||
FROM ghcr.io/talos-systems/installer:latest
|
FROM ghcr.io/talos-systems/installer:latest
|
||||||
COPY --from=<custom kernel image> /boot/vmlinuz /usr/install/vmlinuz
|
COPY --from=<custom kernel image> /boot/vmlinuz /usr/install/${TARGETARCH}/vmlinuz
|
||||||
```
|
```
|
||||||
|
|
||||||
When building the image, the `customization` stage will automatically be copied into the rootfs.
|
When building the image, the `customization` stage will automatically be copied into the rootfs.
|
||||||
|
Loading…
Reference in New Issue
Block a user