NB The k3os project seems to be dead: rancher/k3os#846
An example k3os ISO remastering using Docker.
-
Docker image (Ubuntu 22.04) with all the necessary tools installed in order to remaster the k3os ISO file.
-
Customizable configuration (config.yml and grub.cfg) which can be modified before executing the Docker container that does the actual remastering.
-
Possibility to use different k3os release versions by defining it as an environment variable when executing the Docker container.
-
Access to the remastered ISO file from the directory where the Docker container was executed.
Docker Desktop installed.
NB. The setup is tested on macOS Monterey.
Edit the config.yml to fit your needs. The configuration refence can be found from here.
ssh_authorized_keys:
- github:terotuomala
hostname: k3os
k3os:
sysctl:
kernel.printk: "4 4 1 7"
kernel.kptr_restrict: "1"
dns_nameservers:
- 8.8.8.8
- 1.1.1.1
ntp_servers:
- 0.fi.pool.ntp.org
- 1.fi.pool.ntp.org
- 2.fi.pool.ntp.org
- 3.fi.pool.ntp.org
password: rancher
k3s_args:
- server
- "--no-deploy=traefik"Build the Docker image:
$ docker build -t k3os-custom-iso .Run the Docker container using the image build in previous step:
$ docker run --rm -it -v ${PWD}:/k3os --privileged k3os-custom-isoIn order to use different k3os version than the default one v0.21.5-k3s2r1 please add the desired release version as an environment variable:
$ docker run --rm -it -v ${PWD}:/k3os --privileged -e k3os_release_version=<DESIRED_RELEASE_VERSION> k3os-custom-isoThe remastered ISO file k3os-custom.iso can be found from the directory where the Docker container was executed.