forked from bkleiner/ubuntu-firecracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (18 loc) · 736 Bytes
/
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
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND noninteractive
ENV KERNEL_SOURCE_VERSION 5.4.0
WORKDIR /root
RUN apt-get update && apt-get install -y debootstrap build-essential kernel-package \
bison rsync rsyslog \
fakeroot linux-source-$KERNEL_SOURCE_VERSION bc kmod cpio flex cpio \
libncurses5-dev libelf-dev libssl-dev \
&& tar xvf /usr/src/linux-source-$KERNEL_SOURCE_VERSION.tar.*
ADD config/kernel-config /root/linux-source-$KERNEL_SOURCE_VERSION/.config
WORKDIR /root/linux-source-$KERNEL_SOURCE_VERSION
RUN yes '' | make oldconfig \
&& make -j $(nproc) deb-pkg
WORKDIR /root
VOLUME [ "/output", "/rootfs", "/script", "/config" ]
ADD script /script
ADD config /config
CMD [ "/bin/bash", "/script/image.sh" ]