hostapp

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

README

Balena mobynit package

The mobynit utility mounts a container union filesystem and pivot roots a running system into it. Mobynit uses the hostapp package, a module that mounts container union filesystems by either container ID or image label.

Documentation

Index

Examples

Constants

This section is empty.

Variables

View Source
var (
	// Debug enables more verbose logging
	Debug bool = false
	// Verbose enables verbose logging
	Verbose bool = false
)

Functions

This section is empty.

Types

type Config

type Config struct {
	HostConfig `json:"Config"`

	ID     string `json:"ID"`
	Image  string `json:"Image"`
	Name   string `json:"Name"`
	Driver string `json:"Driver"`
}

type Container

type Container struct {
	Config
	MountPath string
}

func Mount

func Mount(rootdir string, label string) ([]Container, error)

Mount a container union filesystem matching either by ID or label

Example
if _, err := Mount("/path/to/rootdir", "unique-label"); err != nil {
	log.Println("Error: ", err)
}
Output:

type HostConfig

type HostConfig struct {
	Labels map[string]string `json:"Labels"`
}

Directories

Path Synopsis
cmd
mobynit
Mobynit can either mount a custom sysroot if specified on the command line, or pivot root inside a default sysroot.
Mobynit can either mount a custom sysroot if specified on the command line, or pivot root inside a default sysroot.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL