docker

package
v0.0.0-...-be0cd49 Latest Latest
Warning

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

Go to latest
Published: May 21, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Resolvers map[string]func(string) ([]string, error)

Resolvers is a map of functions that will determine all the required external resources that could be found inside the meta repo

Functions

func AddCommands

func AddCommands(cli *cli.Cli)

func BuildImage

func BuildImage(buildArgs ...string) error

Types

type Config

type Config struct {
	// Application is always assumed to be the base name of the current directory
	Application string
	// Type allows for correct resolution of required resources
	Type      string   `yaml:"Type"`
	BuildArgs []string `yaml:"BuildArgs"`
	Resources []string `yaml:"Resources"`
	Template  []byte
}

Config contains all the required information in order to build the given application as a docker image

func CreateConfig

func CreateConfig(projectDir string) (*Config, error)

CreateConfig loads the config defined in `ProjectDir/.kepler/config.yaml` and prepares the Dockerfile template defined in `ProjectDir/.kepler/Dockerfile` On success, it will return a struct with all the required information Otherwise, review the returned error message

func (*Config) CreateMetaFile

func (conf *Config) CreateMetaFile() ([]byte, error)

CreateMetaFile will create a dockerfile based off the config.Type and the resources it requires

func (*Config) CreateStandaloneFile

func (conf *Config) CreateStandaloneFile() ([]byte, error)

CreateStandaloneFile strips all the templating from the original template without doing any resource resolution and returns a byte stream that is used as the dockerfile

Jump to

Keyboard shortcuts

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