initial commit
Signed-off-by: ale <ale@manalejandro.com>
This commit is contained in:
commit
1601787db7
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
FROM debian:${DISTRIBUTION:-bookworm}
|
||||
ENV VERSION=${VERSION:-6.12.10}
|
||||
RUN apt update && apt install -y build-essential linux-source bc kmod cpio flex libncurses5-dev libelf-dev libssl-dev dwarves bison wget debhelper python3 && apt clean
|
||||
WORKDIR /usr/src
|
||||
RUN wget https://git.kernel.org/torvalds/t/linux-$VERSION.tar.gz && tar xavf /usr/src/linux-$VERSION.tar.gz && rm -f linux-$VERSION.tar.gz
|
||||
WORKDIR /usr/src/linux-$VERSION
|
||||
COPY ./config .config
|
||||
RUN yes "" | make oldconfig
|
||||
#RUN make ARCH=x86_64 defconfig
|
||||
RUN make -j`nproc` bindeb-pkg
|
25
README.md
Normal file
25
README.md
Normal file
@ -0,0 +1,25 @@
|
||||
# docker-deb-kernel
|
||||
|
||||
### Simple dockerfile to build the Linux kernel with debian packages
|
||||
|
||||
## Configure environment
|
||||
|
||||
$ export DISTRIBUTION=bookworm
|
||||
$ export VERSION=6.12.10
|
||||
Copy your kernel config to the `config` file
|
||||
|
||||
## Build image
|
||||
|
||||
$ docker buildx build -e DISTRIBUTION=$DISTRIBUTION -e VERSION=$VERSION -t docker-deb-kernel .
|
||||
|
||||
## Extract .deb packages from container
|
||||
|
||||
$ docker run -d --rm --name ddk -v ./:/mnt docker-deb-kernel find /usr/src -iname *.deb -exec cp {} /mnt \;
|
||||
|
||||
## Install .deb packages
|
||||
|
||||
$ sudo dpkg -i *.deb
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
Loading…
x
Reference in New Issue
Block a user