forked from weaveworks/ignite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
22 lines (17 loc) · 777 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM luxas/kernel-builder:gcc-7 AS builder
ARG KERNEL_VERSION
ARG KERNEL_EXTRA
RUN git fetch --tags
RUN git checkout v${KERNEL_VERSION} && \
make clean && make mrproper
COPY config-${KERNEL_VERSION}${KERNEL_EXTRA} .config
RUN make EXTRAVERSION=${KERNEL_EXTRA} LOCALVERSION= olddefconfig && \
make EXTRAVERSION=${KERNEL_EXTRA} LOCALVERSION= olddefconfig
RUN make EXTRAVERSION=${KERNEL_EXTRA} LOCALVERSION= -j32
RUN make EXTRAVERSION=${KERNEL_EXTRA} LOCALVERSION= modules_install
RUN cp vmlinux /boot/vmlinux-${KERNEL_VERSION}${KERNEL_EXTRA} && \
ln -s /boot/vmlinux-${KERNEL_VERSION}${KERNEL_EXTRA} /boot/vmlinux && \
cp .config /boot/config-${KERNEL_VERSION}${KERNEL_EXTRA}
FROM scratch
COPY --from=builder /boot /boot
COPY --from=builder /lib/modules /lib/modules