Documentation
¶
Index ¶
- Variables
- func Convert(ctx context.Context, img string, opts ...ConvertOption) error
- func MakeContainerDisk(ctx context.Context, path string, tag string, platform string) error
- func MoveFile(sourcePath, destPath string) error
- func NewImage(ctx context.Context, tag string, imageTmpPath string) (*image, error)
- func OutputFormats() []string
- func RegisterBootloaderProvider(provider BootloaderProvider)
- type BootFS
- type Bootloader
- type BootloaderProvider
- type Builder
- type Config
- type ConvertOption
- func WithBootFS(bootFS BootFS) ConvertOption
- func WithBootLoader(bootLoader string) ConvertOption
- func WithBootSize(bootSize uint64) ConvertOption
- func WithCmdLineExtra(cmdLineExtra string) ConvertOption
- func WithDNS(dns []string) ConvertOption
- func WithDNSSearch(dnsSearch []string) ConvertOption
- func WithExtraHosts(hosts map[string]string) ConvertOption
- func WithHostname(hostname string) ConvertOption
- func WithKeepCache(b bool) ConvertOption
- func WithLuksPassword(password string) ConvertOption
- func WithNetworkManager(networkManager NetworkManager) ConvertOption
- func WithOutput(output string) ConvertOption
- func WithPassword(password string) ConvertOption
- func WithPlatform(platform string) ConvertOption
- func WithPull(b bool) ConvertOption
- func WithRaw(raw bool) ConvertOption
- func WithSize(size uint64) ConvertOption
- func WithSplitBoot(b bool) ConvertOption
- type DockerImage
- type DockerImageConfig
- type Dockerfile
- type NetworkManager
- type OSRelease
- type Release
- type Root
- type RootPath
- type RootUUID
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func MakeContainerDisk ¶ added in v0.1.0
func OutputFormats ¶
func OutputFormats() []string
func RegisterBootloaderProvider ¶ added in v0.3.0
func RegisterBootloaderProvider(provider BootloaderProvider)
Types ¶
type Bootloader ¶ added in v0.3.0
type BootloaderProvider ¶ added in v0.3.0
type BootloaderProvider interface {
New(c Config, r OSRelease, arch string) (Bootloader, error)
Name() string
}
func BootloaderByName ¶ added in v0.3.0
func BootloaderByName(name string) (BootloaderProvider, error)
type Builder ¶ added in v0.1.0
func NewBuilder ¶
func NewBuilder(ctx context.Context, workdir, imgTag, disk string, size uint64, osRelease OSRelease, format string, cmdLineExtra string, splitBoot bool, bootFS BootFS, bootSize uint64, luksPassword string, bootLoader string, platform, hostname string, dns, dnsSearch []string, extraHosts map[string]string) (Builder, error)
type ConvertOption ¶ added in v0.1.0
type ConvertOption func(o *convertOptions)
func WithBootFS ¶ added in v0.3.0
func WithBootFS(bootFS BootFS) ConvertOption
func WithBootLoader ¶ added in v0.3.0
func WithBootLoader(bootLoader string) ConvertOption
func WithBootSize ¶ added in v0.2.0
func WithBootSize(bootSize uint64) ConvertOption
func WithCmdLineExtra ¶ added in v0.1.0
func WithCmdLineExtra(cmdLineExtra string) ConvertOption
func WithDNS ¶ added in v0.4.0
func WithDNS(dns []string) ConvertOption
func WithDNSSearch ¶ added in v0.4.0
func WithDNSSearch(dnsSearch []string) ConvertOption
func WithExtraHosts ¶ added in v0.4.0
func WithExtraHosts(hosts map[string]string) ConvertOption
func WithHostname ¶ added in v0.4.0
func WithHostname(hostname string) ConvertOption
func WithKeepCache ¶ added in v0.2.0
func WithKeepCache(b bool) ConvertOption
func WithLuksPassword ¶ added in v0.2.0
func WithLuksPassword(password string) ConvertOption
func WithNetworkManager ¶ added in v0.1.0
func WithNetworkManager(networkManager NetworkManager) ConvertOption
func WithOutput ¶ added in v0.1.0
func WithOutput(output string) ConvertOption
func WithPassword ¶ added in v0.1.0
func WithPassword(password string) ConvertOption
func WithPlatform ¶ added in v0.3.0
func WithPlatform(platform string) ConvertOption
func WithPull ¶ added in v0.3.0
func WithPull(b bool) ConvertOption
func WithRaw ¶ added in v0.1.0
func WithRaw(raw bool) ConvertOption
func WithSize ¶ added in v0.1.0
func WithSize(size uint64) ConvertOption
func WithSplitBoot ¶ added in v0.2.0
func WithSplitBoot(b bool) ConvertOption
type DockerImage ¶
type DockerImage struct {
DockerImageConfig `json:"Config"`
Architecture string `json:"Architecture"`
Os string `json:"Os"`
Size int `json:"Size"`
}
func (DockerImage) AsRunScript ¶
func (i DockerImage) AsRunScript(w io.Writer) error
type DockerImageConfig ¶ added in v0.0.4
type Dockerfile ¶
type Dockerfile struct {
Image string
Password string
Release OSRelease
NetworkManager NetworkManager
Luks bool
GrubBIOS bool
GrubEFI bool
// contains filtered or unexported fields
}
func NewDockerfile ¶
func NewDockerfile(release OSRelease, img, password string, networkManager NetworkManager, luks, grubBIOS, grubEFI bool) (Dockerfile, error)
func (Dockerfile) Grub ¶ added in v0.3.0
func (d Dockerfile) Grub() bool
type NetworkManager ¶ added in v0.1.0
type NetworkManager string
const ( NetworkManagerNone NetworkManager = "none" NetworkManagerIfupdown2 NetworkManager = "ifupdown" NetworkManagerNetplan NetworkManager = "netplan" )
func (NetworkManager) Validate ¶ added in v0.1.0
func (n NetworkManager) Validate() error
type OSRelease ¶
type OSRelease struct {
ID Release
Name string
VersionID string
Version string
VersionCodeName string
}
func ParseOSRelease ¶
func (OSRelease) SupportsLUKS ¶ added in v0.2.0
Source Files
¶
Click to show internal directories.
Click to hide internal directories.