docker

package
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...Option) (engine.Interface, error)

New creates a docker config with the specified options

Types

type Config

type Config map[string]interface{}

Config defines a docker config file. TODO: This should not be public, but we need to access it from the tests in tools/container/docker

func (*Config) AddRuntime

func (c *Config) AddRuntime(name string, path string, setAsDefault bool, _ ...map[string]interface{}) error

AddRuntime adds a new runtime to the docker config

func (Config) DefaultRuntime

func (c Config) DefaultRuntime() string

DefaultRuntime returns the default runtime for the docker config

func (*Config) RemoveRuntime

func (c *Config) RemoveRuntime(name string) error

RemoveRuntime removes a runtime from the docker config

func (Config) Save

func (c Config) Save(path string) (int64, error)

Save writes the config to the specified path

func (*Config) Set added in v1.14.4

func (c *Config) Set(key string, value interface{})

Set sets the specified docker option

type Option

type Option func(*builder)

Option defines a function that can be used to configure the config builder

func WithLogger

func WithLogger(logger logger.Interface) Option

WithLogger sets the logger for the config builder

func WithPath

func WithPath(path string) Option

WithPath sets the path for the config builder

Jump to

Keyboard shortcuts

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