docker

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Overview

Package docker implements a compiler for turning Blubber configuration into a valid single- or multi-stage Dockerfile.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

func Compile(cfg *config.Config, variant string) (*bytes.Buffer, error)

Compile takes a parsed config.Config and a configured variant name and returns the bytes of a resulting Dockerfile. In the case where artifacts are defined or the shorthand "copies" configured is set, a multi-stage Dockerfile will be returned.

Types

type Instruction added in v0.2.0

type Instruction interface {
	Compile() string
}

Instruction defines an interface for instruction compilation.

func NewInstruction added in v0.2.0

func NewInstruction(bi build.Instruction) (Instruction, error)

NewInstruction takes a general internal build.Instruction and returns a corresponding compilable Docker specific instruction. The given internal instruction is partially compiled at this point by calling Compile() which applies its own logic for escaping arguments, etc.

Jump to

Keyboard shortcuts

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