Skip to content

Commit

Permalink
Add dockerized build
Browse files Browse the repository at this point in the history
  • Loading branch information
kiler129 committed Feb 4, 2021
1 parent 4f151ac commit e1d9dfc
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 6 deletions.
15 changes: 15 additions & 0 deletions build/proxmox/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
31 changes: 25 additions & 6 deletions build/proxmox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <small>*(it WILL fail on Ubuntu!)*</small>
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 <small>*(it WILL fail on Ubuntu!)*</small>
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`
Expand All @@ -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).

0 comments on commit e1d9dfc

Please sign in to comment.