From e1d9dfca5df94b95c1d9fa27596aac3e6fd0f559 Mon Sep 17 00:00:00 2001 From: kiler129 Date: Wed, 3 Feb 2021 21:31:09 -0600 Subject: [PATCH] Add dockerized build --- build/proxmox/Dockerfile | 15 +++++++++++++++ build/proxmox/README.md | 31 +++++++++++++++++++++++++------ 2 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 build/proxmox/Dockerfile diff --git a/build/proxmox/Dockerfile b/build/proxmox/Dockerfile new file mode 100644 index 0000000..3896f0e --- /dev/null +++ b/build/proxmox/Dockerfile @@ -0,0 +1,15 @@ +# vim:set ft=dockerfile: + +# This Dockerfile builds the newest kernel with RMRR patch +# +# TODO Add support for custom branch of build +FROM debian:buster + +RUN mkdir -p /build +WORKDIR /build + +RUN set -x \ + && apt update && apt install -y ca-certificates wget \ + && wget -O /build/build.sh 'https://raw.githubusercontent.com/kiler129/relax-intel-rmrr/master/build/proxmox/build.sh' + +RUN bash /build/build.sh diff --git a/build/proxmox/README.md b/build/proxmox/README.md index 2d21425..c37a498 100644 --- a/build/proxmox/README.md +++ b/build/proxmox/README.md @@ -6,16 +6,17 @@ for some reason you don't/can't trust precompiled packages you can compile the k The easiest way to do it is to use a script provided in this repository, alongside this `README.md` file ([`build/proxmox/build.sh`](build.sh)) -### Prerequisites -1. Proxmox 6 install (recommended) or Debian Buster *(it WILL fail on Ubuntu!)* -2. Root access -3. ~30GB of free space - ### How to do it WITHOUT Docker? This is mostly intended if you want to build & run on your Proxmox host. Jump to [Docker-ized](README.md#how-to-do-it-with-docker) guide if you want to build packages in an isolated environment. +#### Prerequisites +1. Proxmox 6 install (recommended) or Debian Buster *(it WILL fail on Ubuntu!)* +2. Root access +3. ~30GB of free space + +#### Steps 1. Download the [build script](build.sh) (e.g. use `wget https://raw.githubusercontent.com/kiler129/relax-intel-rmrr/build/proxmox/build.sh`) 2. Run the [`build.sh`](build.sh) script from terminal: `RMRR_AUTOINSTALL=1 bash ./build.sh` @@ -28,8 +29,26 @@ guide if you want to build packages in an isolated environment. This process will leave precompiled `*.deb` packages, in case you want to copy them to other Proxmox hosts you have. +--- ### How to do it WITH Docker? This is mostly intended for building packages for later use (and/or when you don't want to mess with your OS). -//TODO +***TODO:** Currently the script will always build the newest `master` branch (so it's not suitable for CI).* + +#### Prerequisites +1. Docker installed (tested on macOS & Debian 10) +2. ~30GB of free space + +#### Steps + +1. Build the container image *(this will build the kernel)*: + `docker build -t build-img -f Dockerfile .` +2. Create dummy container from image: + `docker create --name build-cont build-img` +3. Copy debs *(it will give you `debs` folder)*: + `docker cp build-cont:/build/proxmox-kernel/debs ./` +4. Cleanup image & dummy container: + `docker rmi -f build-img` + +Now you can [install debs like you would premade packages](../../README.md#proxmox---premade-packages-easy).