INNER CODE UNIT · Go

createSpec

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

func createSpec(r io.Reader, rootfs string, debug bool, debugInit bool, imageConfigPath, runtimeConfigPath, imageRootfsPath string, noVmtouch bool, noBinfmt bool) error {
	if rootfs == "" {
		return fmt.Errorf("rootfs path must be specified")
	}
	var config ocispec.Image
	if err := json.NewDecoder(r).Decode(&config); err != nil {
		return err
	}
	s, err := generateSpec(config, rootfs)
	if err != nil {
		return err
	}
	var binfmtArch string
	if !noBinfmt {
		if arch := config.Architecture; arch != "riscv64" && arch != "amd64" {
			binfmtArch = arch
		}
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…