Documentation ¶
Index ¶
- Variables
- func BuildKernel(container llb.State, source File, config *File) (kernelCfg File, vmlinuz File, modules Directory)
- func GetMoby(ref string) (llb.State, error)
- func GoFSToLLB(fs gofs.FS, rewrite RewriteFn) (llb.State, error)
- func JammyRootfs() llb.State
- func KernelBuildBase() llb.State
- func Mod(modSource llb.State, name, p, target string) llb.State
- func QemuBase() llb.State
- type Directory
- type DiskImageSpec
- type File
- type Kernel
- type KernelVersion
- type RewriteFn
Constants ¶
This section is empty.
Variables ¶
View Source
var BaseKernelOptions = map[string]string{
"CONFIG_BINFMT_ELF": "y",
"CONFIG_BLOCK": "y",
"CONFIG_BLK_DEV": "y",
"CONFIG_BRIDGE": "y",
"CONFIG_BRIDGE_NETFILTER": "y",
"CONFIG_BRIDGE_VLAN_FILTERING": "y",
"CONFIG_CPUSETS": "y",
"CONFIG_CGROUPS": "y",
"CONFIG_CGROUP_BPF": "y",
"CONFIG_CGROUP_CPUACCT": "y",
"CONFIG_CGROUP_DEVICE": "y",
"CONFIG_CGROUP_FREEZER": "y",
"CONFIG_CGROUP_PIDS": "y",
"CONFIG_CGROUP_SCHED": "y",
"CONFIG_INET_ESP": "m",
"CONFIG_IPC_NS": "y",
"CONFIG_IP_NF_FILTER": "y",
"CONFIG_IP_NF_NAT": "y",
"CONFIG_IP_NF_TARGET_MASQUERADE": "y",
"CONFIG_IP_VALN": "m",
"CONFIG_IP_VS": "m",
"CONFIG_IP_VS_RR": "y",
"CONFIG_KEYS": "y",
"CONFIG_MACVLAN": "m",
"CONFIG_MEMCG": "y",
"CONFIG_MEMCG_SWAP": "y",
"CONFIG_MODULES": "y",
"CONFIG_NAMESPACES": "y",
"CONFIG_NET": "y",
"CONFIG_NETFILTER_XT_MATCH_ADDRTYPE": "y",
"CONFIG_NETFILTER_XT_MATCH_CONNTRACK": "y",
"CONFIG_NETFILTER_XT_MATCH_IPVS": "y",
"CONFIG_NETFILTER_XT_MARK": "y",
"CONFIG_NETDEVICES": "y",
"CONFIG_NET_CORE": "y",
"CONFIG_NET_NS": "y",
"CONFIG_OVERLAY_FS": "m",
"CONFIG_PID_NS": "y",
"CONFIG_POSIX_MQUEUE": "y",
"CONFIG_TTY": "y",
"CONFIG_UTS_NS": "y",
"CONFIG_USER_NS": "y",
"CONFIG_VETH": "y",
"CONFIG_VXLAN": "m",
"CONFIG_XFRM": "y",
"CONFIG_9P_FS": "y",
"CONFIG_DEBUG_KERNEL": "y",
"CONFIG_DRM_VIRTIO_GPU": "y",
"CONFIG_HYPERVISOR_GUEST": "y",
"CONFIG_INET": "y",
"CONFIG_IP_PNP": "y",
"CONFIG_IP_PNP_DHCP": "y",
"CONFIG_KVM_GUEST": "y",
"CONFIG_NET_9P": "y",
"CONFIG_NET_9P_VIRTIO": "y",
"CONFIG_NETWORK_FILESYSTEMS": "y",
"CONFIG_PCI": "y",
"CONFIG_PCI_MSI": "y",
"CONFIG_PARAVIRT": "y",
"CONFIG_S390_GUEST": "y",
"CONFIG_SCSCI_LOWLEVEL": "y",
"CONFIG_SCSCI_VIRTIO": "y",
"CONFIG_SERIAL_8250": "y",
"CONFIG_SERIAL_8250_CONSOLE": "y",
"CONFIG_VIRTUALIZATION": "y",
"CONFIG_VIRTIO": "y",
"CONFIG_VIRTIO_BLK": "y",
"CONFIG_VIRTIO_CONSOLE": "y",
"CONFIG_VIRTIO_INPUT": "y",
"CONFIG_VIRTIO_MENU": "y",
"CONFIG_VIRTIO_NET": "y",
}
BaseKernelOptions are used when building the kernel w/o a custom config. We take the minimal `tinyconfig` and add these on top.
View Source
var DockerdInitScriptName = "/usr/local/bin/dockerd-init"
View Source
var GoImageRef = "golang:1.20"
View Source
var JammyRef = "ubuntu:jammy"
View Source
var MobyKernelMods = []string{
"br_netfilter",
"ip_conntrack",
"ip_tables",
"ipt_conntrack",
"ipt_MASQUERADE",
"ipt_REJECT",
"ipt_state",
"iptable_filter",
"iptable_nat",
"overlay",
"nf_conntrack",
"nf_conntrack_netlink",
"xt_addrtype",
"xt_u32",
"veth",
}
View Source
var MobyRef = "docker:23-dind"
View Source
var UseMergeOp = true
Functions ¶
func BuildKernel ¶
func JammyRootfs ¶
func KernelBuildBase ¶
Types ¶
type Directory ¶
type Directory struct {
// contains filtered or unexported fields
}
func (Directory) WithTarget ¶
type DiskImageSpec ¶
func (*DiskImageSpec) Build ¶
func (s *DiskImageSpec) Build() File
type File ¶
type File struct {
// contains filtered or unexported fields
}
func DockerdInitScript ¶
func DockerdInitScript() File
func GetKernelSource ¶
func (File) WithTarget ¶
type KernelVersion ¶
func ParseKernelVersion ¶
func ParseKernelVersion(version string) (KernelVersion, error)
Click to show internal directories.
Click to hide internal directories.