Skip to main content

generate_dockerfile

Function generate_dockerfile 

Source
pub fn generate_dockerfile(kernel_version: &str) -> String
Expand description

Generate the Dockerfile content for building a Linux kernel.

The Dockerfile:

  1. Starts from Alpine 3.19 (small, fast package install)
  2. Installs the full GCC build toolchain + kernel build dependencies
  3. Downloads the specified kernel version from kernel.org
  4. Copies the RVF microVM kernel config
  5. Runs make olddefconfig to fill in defaults, then builds bzImage
  6. Multi-stage build: final image contains only the bzImage