INNER CODE UNIT · Go

generateBootConfig

container2wasm/container2wasm · cmd/create-spec/main.go:384

func generateBootConfig(debug, debugInit bool, imageConfigPath, runtimeConfigPath, imageRootfsPath string, noVmtouch bool, binfmtArch string, externalBundle bool) (*inittype.BootConfig, error) {
	runcArgs := []string{"run", "-b", runtimeBundlePath, "foo"}
	if debug {
		runcArgs = append([]string{"--debug"}, runcArgs...)
	}
	var cmdPreRun [][]string
	if !noVmtouch {
		cmdPreRun = [][]string{
			{"vmtouch", "-tv", "/sbin/runc", "/sbin/init"},
		}
	}
	bootConfig := &inittype.BootConfig{
		Debug:     debug,
		DebugInit: debugInit,
		Cmd: [][]string{
			append([]string{"/sbin/runc"}, runcArgs...),
		},
		CmdPreRun: cmdPreRun,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…