docker

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DockerPath string `json:"docker_path"` // '/Applications/Docker.app/Contents/Resources/bin/docker'

	ImagesPath    string `json:"images_path"`    // Where to look/store docker file images
	WorkspacePath string `json:"workspace_path"` // Where to place the disks

	DownloadUser     string `json:"download_user"`     // The user will be used in download operations
	DownloadPassword string `json:"download_password"` // The password will be used in download operations
}

func (*Config) Apply

func (c *Config) Apply(config []byte) error

func (*Config) Validate

func (c *Config) Validate() (err error)

type Definition

type Definition struct {
	Image        string               `json:"image"`        // Image name to use
	Images       map[string]string    `json:"images"`       // List of image dependencies
	Requirements drivers.Requirements `json:"requirements"` // Required resources to allocate
}

*

func (*Definition) Apply

func (d *Definition) Apply(definition string) error

func (*Definition) Validate

func (d *Definition) Validate() error

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

Implements drivers.ResourceDriver interface

func (*Driver) Allocate

func (d *Driver) Allocate(definition string, metadata map[string]interface{}) (string, string, error)

*

  • Allocate container out of the images *
  • It automatically download the required images, unpack them and runs the container.
  • Using metadata to create env file and pass it to the container.

func (*Driver) Deallocate

func (d *Driver) Deallocate(hwaddr string) error

func (*Driver) Name

func (d *Driver) Name() string

func (*Driver) Prepare

func (d *Driver) Prepare(config []byte) error

func (*Driver) Snapshot

func (d *Driver) Snapshot(hwaddr string, full bool) (string, error)

func (*Driver) Status

func (d *Driver) Status(hwaddr string) string

func (*Driver) ValidateDefinition

func (d *Driver) ValidateDefinition(definition string) error

Jump to

Keyboard shortcuts

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