cloud-container is only a builder for a custom initramfs image that allows running containers on cloud-hypervisor
. The container root is served over virtiofs
.
The image does the following for this to work:
- Add all required
virtio
modules to supportvirtiofs
,pci
, anddisks
- Expose environment variables from
/etc/environment
to the containerentrypoint
. A container manager then can simply write down the /etc/environment file in the container root before booting. - Pre mount attached disks to configured endpoints
- Configure network interface via cmdline argument passed to the kernel setupnetwork
net_ethX=SPEC
argument to configure each interface TO BE DEFINEDmnt_vdX=/path
auto mount disk to given end point TODO
pre-requirements: docker
This will build the required initram-fs Run
./build.sh
To build the kernel, use the config
file from the repo to build the kernel. This is only tested with linux 5.12.9. This will be automated later in this repo as well. buf for now you have to do do it manually.
pre-requirement: virtiofsd
, cloud-hypervisor
extract a container root (or mount a container flist)
to edit the environment variables available to your entrypoint you have to edit
<rootfs>/etc/environment
Run
./test.sh <rootfs> [entrypoint]
default entrypoint in /bin/bash