docker

package
v0.0.0-...-86d10e1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const ExecutableName = "docker"

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildOptions

type BuildOptions struct {
	Remove  bool
	NoCache bool
	Tag     string
	File    string
	Context string
}

type CLI

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

func NewCLI

func NewCLI(executable Executable) CLI

func (CLI) Build

func (c CLI) Build(options BuildOptions) (string, string, error)

func (CLI) RemoveImage

func (c CLI) RemoveImage(image string, options RemoveImageOptions) (string, string, error)

func (CLI) Run

func (c CLI) Run(image string, options RunOptions) (string, string, error)

type Dockerfile

type Dockerfile struct {
	*bytes.Buffer
}

func BuildStagingDockerfile

func BuildStagingDockerfile(logger lager.Logger, fixturePath, buildpackPath string, envs []string) Dockerfile

func NewDockerfile

func NewDockerfile(baseImage string, instructions ...DockerfileInstruction) Dockerfile

type DockerfileInstruction

type DockerfileInstruction struct {
	Type    DockerfileInstructionType
	Content string
}

func NewDockerfileADD

func NewDockerfileADD(content string) DockerfileInstruction

func NewDockerfileENV

func NewDockerfileENV(content string) DockerfileInstruction

func NewDockerfileFROM

func NewDockerfileFROM(content string) DockerfileInstruction

func NewDockerfileRUN

func NewDockerfileRUN(content string) DockerfileInstruction

func NewDockerfileUSER

func NewDockerfileUSER(content string) DockerfileInstruction

func (DockerfileInstruction) String

func (di DockerfileInstruction) String() string

type DockerfileInstructionType

type DockerfileInstructionType string
const (
	DockerfileInstructionTypeFROM DockerfileInstructionType = "FROM"
	DockerfileInstructionTypeADD  DockerfileInstructionType = "ADD"
	DockerfileInstructionTypeRUN  DockerfileInstructionType = "RUN"
	DockerfileInstructionTypeENV  DockerfileInstructionType = "ENV"
	DockerfileInstructionTypeUSER DockerfileInstructionType = "USER"
)

type Executable

type Executable interface {
	Execute(pexec.Execution) error
}

type RemoveImageOptions

type RemoveImageOptions struct {
	Force bool
}

type RunOptions

type RunOptions struct {
	Network string
	Remove  bool
	TTY     bool
	Command string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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