Building Netkit-JH with Docker
The current Netkit-JH build scripts currently rely on being run on a Debian Bullseye host. An alternative to creating a full VM for Netkit development is using a docker container based on a Debian Bullseye image.
#
Install DockerInstall docker using the instructions here.
#
Clone the Netkit Build RepoThe following commands assume that your working directory is the root of this repo.
#
Building the Docker ImageFirst we need to build a docker image which will be used for building Netkit-JH.
This creates an image under the name 'netkit-builder-deb'.
#
Running the Build Process in the Docker ImageTo compile all components of Netkit-JH (the kernel, the filesystem and the core executables) run:
If you would like to pass your own arguments to make
, you can add -e MAKE_ARGS=""
to the docker command, with the necessary make
arguments. Some examples are shown below:
- Kernel
- Filesystem
- Core
- Clean
To clean up the files used in the build process run:
caution
The kernel must be built before the filesystem! This is because the kernel modules are copied over to the filesystem as part of the fs build process. If you don't give any MAKE_ARGS this won't be an issue, but if you decide to give MAKE_ARGS="build-fs"
before the kernel has been built, it will not build successfully.