config

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package config loads drun presets from the embedded defaults and an optional user override at $XDG_CONFIG_HOME/drun/presets.yaml (falling back to ~/.config/drun/presets.yaml). User presets fully replace shipped ones with the same name.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Preset

type Preset struct {
	Image      string              `yaml:"image"`
	Layer      map[string][]string `yaml:"x-drun-layer,omitempty"`
	Home       string              `yaml:"x-drun-home,omitempty"`
	Mounts     []string            `yaml:"volumes,omitempty"`
	Env        map[string]string   `yaml:"environment,omitempty"`
	Ports      []string            `yaml:"ports,omitempty"`
	Entrypoint string              `yaml:"entrypoint,omitempty"`
	Command    []string            `yaml:"command,omitempty"`
	User       string              `yaml:"user,omitempty"`
}

Preset describes how to run a container.

func (Preset) Validate

func (p Preset) Validate(name string) error

Validate checks a single preset for consistency.

type Presets

type Presets map[string]Preset

Presets is the full keyed collection.

func Load

func Load() (Presets, error)

Load merges the embedded defaults with the user's config at ~/.config/drun/presets.yaml (full replacement on name collision).

Jump to

Keyboard shortcuts

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